You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The order of interactive prompt and traceback on Windows #63038
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2020-11-19.18:17:25.854>created_at=<Date2013-08-26.09:05:07.892>labels= ['type-bug', 'OS-windows']
title='The order of interactive prompt and traceback on Windows'updated_at=<Date2020-11-19.18:17:25.853>user='https://bugs.python.org/Drekin'
On Windows, Python 3.3.2, when I run Python as a subprocess via Popen("py -i somescript.py", stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate() and somescript.py ends with exception, there is first interactive promt ">>>" in stderr output and then the traceback which is reversed to standard order when somescript.py is run interactively directly.
Activity
Drekin commentedon Aug 26, 2013
On Windows, Python 3.3.2, when I run Python as a subprocess via Popen("py -i somescript.py", stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate() and somescript.py ends with exception, there is first interactive promt ">>>" in stderr output and then the traceback which is reversed to standard order when somescript.py is run interactively directly.
Corresponding StackOverflow question: http://stackoverflow.com/questions/18419724/position-of-prompt-in-stderr-after-systemexit .
bitdancer commentedon Aug 26, 2013
For anyone who wants to look in to this: according to the stack overflow question and comments, this is a behavior change between python2 and python3.
Drekin commentedon Jul 27, 2015
Yes, it is a behavior change between Python 2 and Python 3. I just tried with 2.7 and 3.0.
iritkatriel commentedon Nov 16, 2020
On version 3.10, windows 10 I don't see this - the prompt comes after the traceback.
Adam, are you seeing this issue on any python version >= 3.8?
Drekin commentedon Nov 16, 2020
So far I could reproduce the issue on Python 3.7, Windows Vista 64bit. I'll try with newer versions.
Drekin commentedon Nov 19, 2020
The order is fine on Python 3.8, Windows 10.
iritkatriel commentedon Nov 19, 2020
Thanks. I'm closing this because 3.7 is only getting security fixes now.