Python kernel32 exception on Win9x while using DDE extensions

Nic nicbar at mail.com
Tue Nov 13 02:45:43 EST 2001


"Patrick Vrijlandt" <p.vrijlandt at aig.azn.nl> wrote in message news:<9s85bf$5qd$1 at odysseus.uci.kun.nl>...
> > I am running on Win98 SE with the latest DCOM installed.
> > When I try to run the following script fragment from python.exe or
> > pythonw.exe I get a “page fault exception” in
> > kernel32.dll
> >
> > import win32ui
> > import dde
> > import sys
> >
> > def send_string(str):
> >   # …..
> >   pass
> >
> > print "Starting DDE v1.02"
> > cESC = chr(27)
> > cF11 = cESC + '[23~'
> >
> > server = dde.CreateServer()
> >
> > # The problem is in the following line
> > server.Create("ERTestClient")
> 
> should be:
> server.Create('')
> 
> > conv = dde.CreateConversation(server)
> 
> then:
> conv.ConnectTo("ERTestClient", service) # service might be "System"
> 
> >
> > while 1:
> >     str = raw_input("Enter String: ")
> >     if str == "EXIT": break
> >     str_all = cF11 + str
> >     ## send_string(str_all)
> >
> > print "DONE"
> >
> >
> >
> > Thanks
> > Nic
> 
> I'm afraid dde leaks memory, but Mark H hasn't confirmed this yet. Think of
> this if your app fails after a few thousand dde calls.

Thanks for your help.

I tried the corrections you suggested but I still get an exception
while running the script from python.exe from the command line.

The same script works fine inside the pythonwin environment.

The problem only occurred on Win9X, on NT and 2000 it works OK.

Do anybody know if this a general problem with the windows extensions
or only with the DDE?

Thanks

Nic.



More information about the Python-list mailing list