popen2 on Windows

John van der Koijk vdkoijk at linux01.prc.tno.nl
Mon Jul 5 03:34:04 EDT 1999


I hope this is not a FAQ:

First, let me set the stage:

I'm trying to implement a control loop using python and a DDE
application under Windows 95. The DDE link freezes as soon as I start
a thread in the python program, in order to run a Tkinter GUI.

(((
I've taken care of the Tkinter mainloop vs. threading problem using

# Ernst-Udo Wallenborn <wallenborn at phys.chem.ethz.ch> says:
def mainloop(self):
	dummy = 0
        while 1:
		Frame.update(self)
		time.sleep(0.02)
#		if self.quitting == 1:
#			sys.exit(0)

root.mainloop = mainloop
root.mainloop(root)

which is puzzling because `quitting' does not seem to be known here.
)))

After coping with my initial frustration, I've decided to make an
unthreaded stub program talking to the DDE client, using popen2 to do
the IPC with the GUI and controller program. Sadly, this approach also
does not seem to work, because using popen2 gives me:

[....] os.fork()
AttributeError: fork

This is amazing, since the manual for 1.5.2 says:

8.13 popen2 -- Subprocesses with accessible standard I/O streams

   Availability: Unix, Windows.

I'm using Python 1.5.2 (#0). Could anyone give me a clue what could be
wrong?

Kind regards,
-- 
John van der Koijk.
--
TNO Institute of Industrial Technology

PO Box 5073, 2600 GB, Delft, The Netherlands
Phone +31 15 2608833, Fax +31 15 2608846 




More information about the Python-list mailing list