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
  ImportError: cannot import name 'NullHandler' from 'logging' sukanta80 0 630 Jul-28-2025, 03:26 PM
Last Post: sukanta80
  Dynamic Module Import Error DaddyMAN 3 1,642 Jun-20-2025, 12:07 AM
Last Post: Pedroski55
  ImportError: cannot import name 'Pyfhel' from 'Pyfhel' Anldra12 11 8,146 Jun-16-2025, 07:08 AM
Last Post: ItsTheGoose
  Error on import: SyntaxError: source code string cannot contain null bytes kirkwilliams2049 10 26,950 May-26-2025, 01:55 PM
Last Post: deanhystad
Question Import vs from x import Calab 1 787 May-15-2025, 04:09 PM
Last Post: snippsat
  I'm trying to import a dataset into a Jupyter Notebook Hisilat03 0 1,218 Mar-24-2025, 09:26 AM
Last Post: Hisilat03
  beginner doesn't understand import cimerio 3 1,164 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 1,352 Dec-13-2024, 06:50 AM
Last Post: Gribouillis
  python 3.13 : import whois HansieB 1 1,408 Nov-30-2024, 02:58 PM
Last Post: snippsat
Question [SOLVED] Why "import foo" + "from foo import bar"? Winfried 4 2,232 Nov-26-2024, 08:13 AM
Last Post: Winfried

Forum Jump:

User Panel Messages

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