Two questions about the dde module:
1. Why is the documentation so poor?
For example, dde.__doc__ is None, and the docs for PyDDEConv.Exec
describes the ConnectTo command (fortunately, there are samples
distributed with the ActiveState installation which show the
correct calling sequence for Exec()).
2. Why does Exec throw an exception even when the command succeeds?
import win32ui, dde
server = dde.CreateServer()
server.Create("TestClient")
conversation = dde.CreateConversation(server)
conversation.ConnectTo("IExplore", "WWW_OpenURL")
conversation.Exec('"http://cancer.gov",,0,,,,,')
This code actually does what it's supposed to: it connects to a
running instance of Internet Explorer and opens the requested
page. But, having done that successfully, it also does something
it shouldn't do: throws an exception:
Traceback (most recent call last):
File "C:\usr\SRC\dde\tdde.py", line 22, in ?
conversation.Exec('"http://cancer.gov",,0,,,,,')
error: Exec failed
Details:
ActivePython 2.2.1 Build 222 (ActiveState Corp.) based on
Python 2.2.1 (#34, Apr 15 2002, 09:51:39) [MSC 32 bit (Intel)]
Windows 2000 Professional SP2
IE 6.0.2600.0000
--
Bob Kline
mailto:[EMAIL PROTECTED]
http://www.rksystems.com
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython