ddeclient.py 432 B

12345678910111213141516171819
  1. # 'Request' example added jjk 11/20/98
  2. import win32ui
  3. import dde
  4. server = dde.CreateServer()
  5. server.Create("TestClient")
  6. conversation = dde.CreateConversation(server)
  7. conversation.ConnectTo("RunAny", "RunAnyCommand")
  8. conversation.Exec("DoSomething")
  9. conversation.Exec("DoSomethingElse")
  10. conversation.ConnectTo("RunAny", "ComputeStringLength")
  11. s = 'abcdefghi'
  12. sl = conversation.Request(s)
  13. print('length of "%s" is %s'%(s,sl))