Re: How a script can know if it has been called with the -i command line option?

2006-12-23 Thread vasudevram
vasudevram wrote: > Peter Wang wrote: > > Michele Simionato wrote: > > > The subject says it all, I would like a script to act differently when > > > called as > > > $ python script.py and when called as $ python -i script.py. I looked > > > at the sys module > > > but I don't see a way to retrie

Re: How a script can know if it has been called with the -i command line option?

2006-12-23 Thread vasudevram
Peter Wang wrote: > Michele Simionato wrote: > > The subject says it all, I would like a script to act differently when > > called as > > $ python script.py and when called as $ python -i script.py. I looked > > at the sys module > > but I don't see a way to retrieve the command line flags, where

Re: How a script can know if it has been called with the -i command line option?

2006-12-22 Thread Tim Golden
> > Michele Simionato wrote: > >> The subject says it all, I would like a script to act differently when > >> called as > >> $ python script.py and when called as $ python -i script.py. [Michael B. Trausch] > There is a set of utilities that have UNIX-like ps behavior, but, as is > typical for Win

Re: How a script can know if it has been called with the -i command line option?

2006-12-22 Thread Michael B. Trausch
Peter Wang wrote: > Michele Simionato wrote: >> The subject says it all, I would like a script to act differently when >> called as >> $ python script.py and when called as $ python -i script.py. I looked >> at the sys module >> but I don't see a way to retrieve the command line flags, where should

Re: How a script can know if it has been called with the -i command line option?

2006-12-22 Thread Peter Wang
Michele Simionato wrote: > The subject says it all, I would like a script to act differently when > called as > $ python script.py and when called as $ python -i script.py. I looked > at the sys module > but I don't see a way to retrieve the command line flags, where should > I look? I realize th

Re: How a script can know if it has been called with the -i command line option?

2006-12-21 Thread Carsten Haese
On Thu, 2006-12-21 at 11:22 -0800, [EMAIL PROTECTED] wrote: > Michele Simionato wrote: > > The subject says it all, I would like a script to act differently when > > called as > > $ python script.py and when called as $ python -i script.py. I looked > > at the sys module > > but I don't see a way t

Re: How a script can know if it has been called with the -i command line option?

2006-12-21 Thread commander . coder
Michele Simionato wrote: > The subject says it all, I would like a script to act differently when > called as > $ python script.py and when called as $ python -i script.py. I looked > at the sys module > but I don't see a way to retrieve the command line flags, where should > I look? In the optpar

Re: How a script can know if it has been called with the -i command line option?

2006-12-21 Thread Thomas Heller
Michele Simionato schrieb: > The subject says it all, I would like a script to act differently when > called as > $ python script.py and when called as $ python -i script.py. I looked > at the sys module > but I don't see a way to retrieve the command line flags, where should > I look? > TIA, > >

How a script can know if it has been called with the -i command line option?

2006-12-21 Thread Michele Simionato
The subject says it all, I would like a script to act differently when called as $ python script.py and when called as $ python -i script.py. I looked at the sys module but I don't see a way to retrieve the command line flags, where should I look? TIA, Michele Simionato -- http://mail.