On Nov 13, 10:28 am, hetchkay wrote:
> On Nov 13, 9:50 am, John Yeung wrote:
>
>
>
> > On Nov 12, 11:22 pm, r wrote:
>
> > > On Nov 12, 10:07 pm, hetchkay wrote:
> > > > I have the following in exit.py:
> > > > import sys
> > > > sys.exit(0)
>
> > > > I now try 'python -i exit.py':
>
> > > > In
On Nov 13, 9:50 am, John Yeung wrote:
> On Nov 12, 11:22 pm, r wrote:
>
>
>
> > On Nov 12, 10:07 pm, hetchkay wrote:
> > > I have the following in exit.py:
> > > import sys
> > > sys.exit(0)
>
> > > I now try 'python -i exit.py':
>
> > > In 2.5, the script exits as I would expect.
>
> > > In 2.6
In article
<008aa7ef-b945-4f70-b5e4-def66546e...@2g2000prl.googlegroups.com>,
hetchkay wrote:
> I have the following in exit.py:
> import sys
> sys.exit(0)
>
> I now try 'python -i exit.py':
>
> In 2.5, the script exits as I would expect.
>
> In 2.6, the following error is printed:
>
> Trace
On Nov 12, 11:32 pm, hetchkay wrote:
> But I don't understand why the interpreter does not exit in 2.6 but
> does exit in 2.5. Well, I do not need to understand that but I need to
> know how to get the interpreter to exit in 2.6.
Well, taken at face value, I would say the answer is to not use the
On Nov 12, 11:22 pm, r wrote:
> On Nov 12, 10:07 pm, hetchkay wrote:
> > I have the following in exit.py:
> > import sys
> > sys.exit(0)
>
> > I now try 'python -i exit.py':
>
> > In 2.5, the script exits as I would expect.
>
> > In 2.6, the following error is printed:
>
> > Traceback (most recen
Hello,
Thanks for your help.
I know what SystemExit is. In 2.5 as well SystemExit is raised when
sys.exit() is called. For example:
try:
import sys
sys.exit(0)
except SystemExit:
print "system exit raised"
raise
But I don't understand why the interpreter does not exit in 2.6 but
does exi
PS: Python even answers questions:
>>> import sys
>>> help(sys.exit)
Help on built-in function exit in module sys:
exit(...)
exit([status])
Exit the interpreter by raising SystemExit(status).
If the status is omitted or None, it defaults to zero (i.e.,
success).
If the status is
On Nov 12, 10:07 pm, hetchkay wrote:
> Hello,
>
> I have the following in exit.py:
> import sys
> sys.exit(0)
>
> I now try 'python -i exit.py':
>
> In 2.5, the script exits as I would expect.
>
> In 2.6, the following error is printed:
>
> Traceback (most recent call last):
> File "exit.py", li
Hello,
I have the following in exit.py:
import sys
sys.exit(0)
I now try 'python -i exit.py':
In 2.5, the script exits as I would expect.
In 2.6, the following error is printed:
Traceback (most recent call last):
File "exit.py", line 2, in
sys.exit(0)
SystemExit: 0
>>>
I couldn't find
Hello,
I have the following in exit.py:
import sys
sys.exit(0)
I now try 'python -i exit.py':
In 2.5, the script exits as I would expect.
In 2.6, the following error is printed:
Traceback (most recent call last):
File "exit.py", line 2, in
sys.exit(0)
SystemExit: 0
>>>
I couldn't find
10 matches
Mail list logo