[pywin32-bugs] [ pywin32-Bugs-2694452 ] DDE failing in pywin32 > build 207?
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2009-03-27 22:10:50
|
Bugs item #2694452, was opened at 2009-03-20 00:32 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=2694452&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: pythonwin Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jon Nicoll (jknsf) Assigned to: Nobody/Anonymous (nobody) Summary: DDE failing in pywin32 > build 207? Initial Comment: Apologies if this is not the place to report this ... I'm having a go at using DDE to control an app via pywin32. It's nearly 15 years since I used DDE, but what the hell... However the simplest startup (essentially taken from the sample script) doesn't seem to work: >>> import dde >>> server = dde.CreateServer() >>> server.Create('TestClient') Traceback (most recent call last): File "<interactive input>", line 1, in <module> error: The server could not be created >>> I see I'm not the only one with this problem: Raymond Lee sees the same in his blog towards the end of last year and reports (in <http://blog.dataunbound.com/category/ecco-pro/> ): "I have found that the current version of pywin32 (v 212) doesn't work, and that the newest version that does work is version 207" I was trying with ActiveState Python and build v212 of pywin32. I guess I could try to install an older version of Pywin32, but any idea what is going on here? Thanks for pywin32 anyway! regards Jon N ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2009-03-28 09:10 Message: yeah - sorry for the confusion - pythonwin uses the one available server. ---------------------------------------------------------------------- Comment By: Jon Nicoll (jknsf) Date: 2009-03-28 03:43 Message: update: something very strange seems to be going on: Mark says: Further, the following works for me from a 2.6 python.exe: >>> import win32ui, dde >>> dde.CreateServer().Create('TestClient') >>> So I tried this in both ActiveState Python 2.5.1 (not shown), ActiveState Python 2.6.1 (pythonwin), and ActivePython 2.6.1.1 command line: #1: PythonWin 2.6.1 (r261:67515, Dec 5 2008, 13:58:38) [MSC v.1500 32 bit (Intel)] on win32. Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information. >>> import win32ui, dde >>> dde.CreateServer().Create('TestClient') Traceback (most recent call last): File "<interactive input>", line 1, in <module> error: The server could not be created >>> #2: C:\Documents and Settings\jkn>python ActivePython 2.6.1.1 (ActiveState Software Inc.) based on Python 2.6.1 (r261:67515, Dec 5 2008, 13:58:38) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import win32ui, dde >>> dde.CreateServer().Create('TestClient') >>> Hmm - maybe I've just had an 'aha' moment. Mark, when you say "note that pythonwin still uses dde", are you meaning "It uses (up) a/the server"? I thought you weew meaning "It still works in pythonwin, which uses code like this...". So maybe I can't use DDE interactively with PythonWin? If so I guess this also ought to be documented... Jon N ---------------------------------------------------------------------- Comment By: Jon Nicoll (jknsf) Date: 2009-03-28 00:07 Message: Hmm ... OK. I guess the sample code should be updated to reflect this change? Also, wouldn't it be better to leave the API and change the behaviour? So that the canonical form works to create a server works, but. further attempts return in either some sort of errror, or the same server. Regards Jon N ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2009-03-27 12:26 Message: I can't explain why that little sample doesn't work, but note that pythonwin still uses dde. Further, the following works for me from a 2.6 python.exe: >>> import win32ui, dde >>> dde.CreateServer().Create('TestClient') >>> ---------------------------------------------------------------------- Comment By: Roger Upole (rupole) Date: 2009-03-27 11:50 Message: This is due to removal of support for multiple servers. It was implemented via some low-level hacks that were incompatible with DEP prevention and 64-bit. You should be able to create your own server from python.exe, or if Pythonwin's own DDE is disabled by starting it with /nodde. Roger ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=2694452&group_id=78018 |