gp1313 / iep

Automatically exported from code.google.com/p/iep
0 stars 0 forks source link

"The kernel process exited." gives wrong exit code #159

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
> What steps will reproduce the problem?
1. Start IEP/Pyzo
2. type:
import sys
sys.exit(3)
3. The kernel responds: "The kernel process exited. (0)"

> What is the expected output?
"The kernel process exited. (3)"

Tested in Python 2.7 and 3.2 in Iep 3.1 on Windows 7.

> Please provide any additional information below.

Similarly,

import sys
sys.stderr.write('text to stderr is output on the console in red')
sys.exit('exit text is not')

behaves undesiredly: the 'exit text is not' is sent to stderr by Python but it 
is not shown on the console. I expected this to happen (it took me an hour to 
find that the exiting of the kernel was due to a sys.exit() with a very nice 
descriptive string which was not shown).

Original issue reported on code.google.com by gijsvano...@gmail.com on 4 Feb 2013 at 2:32

GoogleCodeExporter commented 8 years ago

Original comment by almar.klein@gmail.com on 4 Feb 2013 at 8:04

GoogleCodeExporter commented 8 years ago
This issue was closed by revision a7f3a0411859.

Original comment by almar.klein@gmail.com on 4 Feb 2013 at 8:06

GoogleCodeExporter commented 8 years ago
The new code seems to have broken good behavior when typing exit():

Python 3.2.2 (default, Sep  4 2011, 09:51:08) on Windows (32 bits).
This is the IEP interpreter with integrated event loop for PYSIDE.
Type "help" for help, type "?" for a list of *magic* commands.
>>> exit()
Traceback (most recent call last):
  File "D:\Gijs\Python\iep-dev-trunk\iep\iepkernel\start.py", line 141, in <module>
    __iep__.interact()
  File "D:\Gijs\Python\iep-dev-trunk\iep\iepkernel\interpreter.py", line 130, in interact
    self._mainloop()
  File "D:\Gijs\Python\iep-dev-trunk\iep\iepkernel\interpreter.py", line 359, in _mainloop
    more = self.pushline(line3)
  File "D:\Gijs\Python\iep-dev-trunk\iep\iepkernel\interpreter.py", line 432, in pushline
    more = self._runlines(source, self._filename)

(note: an older version of IEP just responded "The kernel process exited. (0)"

Tested with the most recent revision (a7f3a0411859) of IEP on Windows 7.

Original comment by gijsvano...@gmail.com on 5 Feb 2013 at 10:45

GoogleCodeExporter commented 8 years ago
Reproduced.

Original comment by almar.klein@gmail.com on 5 Feb 2013 at 12:12

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 2ad4c3f27136.

Original comment by almar.klein@gmail.com on 5 Feb 2013 at 12:14