Threading and Windows.

Jorge Godoy godoy at metalab.unc.edu
Mon Sep 29 22:31:50 EDT 2003


Dennis Lee Bieber <wlfraed at ix.netcom.com> writes:

>         Forgive me if this has some obvious facet that I'm missing -- I'm not 
> experienced in os.spawnv* family.

Neither am I. In fact, this program was my first use of it. 

>         However, the documentation I have for os.spawnv() suggests
> that this call alone will create a separate/new process. And you are
> calling it with a no-wait argument... So why do you even need the
> threading overhead?

This isn't the behaviour I found here on a Linux box. The caller
process got 'stuck' and only worked again when the called proccess
ended. 

With threads I got it working all the time. 

>         Hmmm, if "another.py" is the target, you may be encountering the 
> possibility that Windows doesn't know how to start a .py file from the 
> command line. Windows (especially the W9x line) doesn't, to my 
> knowledge, honor #! lines in script files.

Using the thread module I could get it to work on Windows and then,
yes. I got this problem. :-)

Sorry for my lameness on Windows but this isn't my platform of
choice. I'll add some conditional and check the platform... 

On the other hand, isn't there a way to associate programs with
extensions on Windows? Wouldn't this solve the problem with the call I
made? Or it only works in certain circunstances and (by Murphy's law)
this is not one of those circunstances? 


Thanks for your help,
-- 
Godoy.     <godoy at metalab.unc.edu>




More information about the Python-list mailing list