Run a python script as an exe and run a new process from it

venutaurus539 at venutaurus539 at
Thu Feb 26 15:09:22 CET 2009

On Feb 26, 7:00 pm, "venutaurus... at"
<venutaurus... at> wrote:
> On Feb 26, 6:10 pm, Tim Wintle < at> wrote:
> > On Thu, 2009-02-26 at 04:55 -0800, venutaurus... at wrote:
> > > Hello all,
> > >            I've a strange requirement where I need to run a python
> > > script just as we run an exe (by double clicking through windows
> > > explorer or by typing the script name at command prompt).
> > I don't know how windows deals with this part>  In that
> > > process I should be able to execute another python script in such a
> > > way that, the second script should continue running but the main one
> > > should terminate without effecting the second one.
> > standard daemon behavior I'd have thought
> > This shows how you would do it (with lots of comments). Assume this
> > should work on Windows.
> >
> > note the two child threads to prevent zombies - may not be needed on
> > windows but good to use them anyway.
> Thanks for the reply,
>            Being a newbie to python, I am finding it difficult to
> understand the logic even after thorough reading of comments. Is there
> any simpler way where I can just run a python script from the main
> script and exit without disturbing the second one(This will end based
> on some other constraints which can be handled). Or can some one throw
> some light on where should I run the function os.system(" python
>") from the main one.
> Thank you,
> venu

Adding to the above.. I've to do it in Windows platform and what I can
see from the illustration (/dev/null) etc. they are for Unix

Thank you,

More information about the Python-list mailing list