What happens to -i ?
M.-A. Lemburg
mal at lemburg.com
Mon Feb 10 07:12:30 EST 2003
Lee Harr wrote:
> I am trying to determine if a script has been run with
> the -i flag.
>
>
> 11:38 >cat > dashi.py
> # dashi.py
> import sys
> print sys.argv
> #
> 11:38 >python dashi.py
> ['dashi.py']
> 11:38 >python -i dashi.py
> ['dashi.py']
>
>
>
> So, 2 questions:
>
> What happens to -i ?
You switch to interactive mode in case of an exception.
> How can I tell if -i was specified?
You can't. (Unless you wait for mxTools in egenix-mx-base 2.1
where you can query this flag.)
--
Marc-Andre Lemburg
eGenix.com
Professional Python Software directly from the Source (#1, Feb 09 2003)
>>> Python/Zope Products & Consulting ... http://www.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
Python UK 2003, Oxford: 51 days left
EuroPython 2003, Charleroi, Belgium: 135 days left
More information about the Python-list
mailing list