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
  I'm trying to import a dataset into a Jupyter Notebook Hisilat03 0 700 Mar-24-2025, 09:26 AM
Last Post: Hisilat03
  beginner doesn't understand import cimerio 3 467 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 601 Dec-13-2024, 06:50 AM
Last Post: Gribouillis
  python 3.13 : import whois HansieB 1 612 Nov-30-2024, 02:58 PM
Last Post: snippsat
Question [SOLVED] Why "import foo" + "from foo import bar"? Winfried 4 1,219 Nov-26-2024, 08:13 AM
Last Post: Winfried
  import data (.csv) into Jupyter notebook oranstprotonme 2 1,153 Aug-14-2024, 07:08 PM
Last Post: oranstprotonme
  'import requests' problem Curbie 2 755 Aug-14-2024, 01:04 AM
Last Post: Curbie
  import a function from another file using relative path paul18fr 6 2,746 Aug-01-2024, 06:40 AM
Last Post: paul18fr
Bug Python 3.12 cannot import local python files as modules sunflowerdog 25 17,530 Jul-31-2024, 01:52 PM
Last Post: sunflowerdog
  ImportError: cannot import name 'scipy_namespace_for' from 'scipy._lib._array_api' AgileAVS 0 1,702 Jul-15-2024, 08:45 AM
Last Post: AgileAVS

Forum Jump:

User Panel Messages

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