Re: Python process automatically restarting itself

2007-10-11 Thread Matimus
On Oct 11, 7:17 am, Adam Atlas <[EMAIL PROTECTED]> wrote: > What is the best way for a Python process (presumed to be a script run > by the interpreter binary, not embedded in some other program) to > restart itself? This is what I've been trying: > > import __main__ > > for path in sys.pat

Python process automatically restarting itself

2007-10-11 Thread Adam Atlas
What is the best way for a Python process (presumed to be a script run by the interpreter binary, not embedded in some other program) to restart itself? This is what I've been trying: import __main__ for path in sys.path: path += '/' + __main__.__file__ if os.access(path,