Python Forum
Import error when trying to import DDE (part of PyWin32)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Import error when trying to import DDE (part of PyWin32)
#1
Hi Everyone,

I am trying to use dynamic data exchange (DDE) under Windows 7 using Python 2.7. After installing PyWin32 I have tried to run the ddeclient.py to do a first test. I got the following error:

Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\win32\Demos\dde\ddeclient.py", line 4, in <module>
import dde
ImportError: This must be an MFC application - try 'import win32ui' first

ddeclient.py starts with the following code:
# 'Request' example added jjk  11/20/98

import win32ui
import dde
I have tried the same command from command line and got the same error all times. I have looked for a solution in internet and saw several people with the same problem but no solution. How can I solve this problem?

Thanks in advance for any help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Import vs from x import Calab 1 235 May-15-2025, 04:09 PM
Last Post: snippsat
  I'm trying to import a dataset into a Jupyter Notebook Hisilat03 0 816 Mar-24-2025, 09:26 AM
Last Post: Hisilat03
  beginner doesn't understand import cimerio 3 622 Feb-12-2025, 05:02 PM
Last Post: cimerio
  Python: How to import data from txt, instead of running the data from the code? Melcu54 1 721 Dec-13-2024, 06:50 AM
Last Post: Gribouillis
  python 3.13 : import whois HansieB 1 753 Nov-30-2024, 02:58 PM
Last Post: snippsat
Question [SOLVED] Why "import foo" + "from foo import bar"? Winfried 4 1,381 Nov-26-2024, 08:13 AM
Last Post: Winfried
  import data (.csv) into Jupyter notebook oranstprotonme 2 1,354 Aug-14-2024, 07:08 PM
Last Post: oranstprotonme
  'import requests' problem Curbie 2 902 Aug-14-2024, 01:04 AM
Last Post: Curbie
  import a function from another file using relative path paul18fr 6 3,718 Aug-01-2024, 06:40 AM
Last Post: paul18fr
Bug Python 3.12 cannot import local python files as modules sunflowerdog 25 23,664 Jul-31-2024, 01:52 PM
Last Post: sunflowerdog

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020