B
bogdan romocea
Dear Python experts,
I'm facing a simple problem which however I'm having a hard time
solving. I have a DDE server with data that changes from time to time.
I need to put together a DDE client that would 'notice' updated values
on the server and append them as a new row in a text file.
1. How do I connect to the DDE server, and ask for data?
In OpenOffice.org it looks very simple:
=DDE("FPS";"TIME";"PRC")
I also have some VB code which does the same thing:
Private Sub Command1_Click()
Text1.LinkTopic = "FPS|TIME"
Text1.LinkItem = Text4.Text
Text1.LinkMode = vbLinkAutomatic
I checked the DDE client sample code from
C:\Python24\Lib\site-packages\win32\Demos\dde,
however I got stuck here:
conversation.ConnectTo("FPS","PRC")
Traceback (most recent call last):
File "<pyshell#21>", line 1, in ?
conversation.ConnectTo("FPS","PRC")
error: ConnectTo failed
2. Once I manage to connect to the DDE server, how do I append the new
data values in a text file?
Suggestions and sample code will be highly appreciated.
Thank you,
b.
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
I'm facing a simple problem which however I'm having a hard time
solving. I have a DDE server with data that changes from time to time.
I need to put together a DDE client that would 'notice' updated values
on the server and append them as a new row in a text file.
1. How do I connect to the DDE server, and ask for data?
In OpenOffice.org it looks very simple:
=DDE("FPS";"TIME";"PRC")
I also have some VB code which does the same thing:
Private Sub Command1_Click()
Text1.LinkTopic = "FPS|TIME"
Text1.LinkItem = Text4.Text
Text1.LinkMode = vbLinkAutomatic
I checked the DDE client sample code from
C:\Python24\Lib\site-packages\win32\Demos\dde,
however I got stuck here:
conversation.ConnectTo("FPS","PRC")
Traceback (most recent call last):
File "<pyshell#21>", line 1, in ?
conversation.ConnectTo("FPS","PRC")
error: ConnectTo failed
2. Once I manage to connect to the DDE server, how do I append the new
data values in a text file?
Suggestions and sample code will be highly appreciated.
Thank you,
b.
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail