This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年08月26日 09:05 by Drekin, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (7) | |||
|---|---|---|---|
| msg196192 - (view) | Author: Adam Bartoš (Drekin) * | Date: 2013年08月26日 09:05 | |
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 .
|
|||
| msg196216 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2013年08月26日 15:51 | |
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. |
|||
| msg247461 - (view) | Author: Adam Bartoš (Drekin) * | Date: 2015年07月27日 11:20 | |
Yes, it is a behavior change between Python 2 and Python 3. I just tried with 2.7 and 3.0. |
|||
| msg381048 - (view) | Author: Irit Katriel (iritkatriel) * (Python committer) | Date: 2020年11月16日 00:22 | |
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? |
|||
| msg381170 - (view) | Author: Adam Bartoš (Drekin) * | Date: 2020年11月16日 22:04 | |
So far I could reproduce the issue on Python 3.7, Windows Vista 64bit. I'll try with newer versions.
The output I got:
>>> from subprocess import *
>>> Popen("py -i foo.py", stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate()
(b'', b'>>> Traceback (most recent call last):\r\n File "foo.py", line 2, in <module>\r\n 1/0\r\nZeroDivisionError: division by zero\r\n\r\n')
|
|||
| msg381449 - (view) | Author: Adam Bartoš (Drekin) * | Date: 2020年11月19日 18:12 | |
The order is fine on Python 3.8, Windows 10. |
|||
| msg381450 - (view) | Author: Irit Katriel (iritkatriel) * (Python committer) | Date: 2020年11月19日 18:17 | |
Thanks. I'm closing this because 3.7 is only getting security fixes now. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:50 | admin | set | github: 63038 |
| 2020年11月19日 18:17:25 | iritkatriel | set | status: open -> closed resolution: out of date messages: + msg381450 stage: resolved |
| 2020年11月19日 18:12:50 | Drekin | set | messages: + msg381449 |
| 2020年11月16日 22:04:38 | Drekin | set | status: pending -> open messages: + msg381170 |
| 2020年11月16日 00:22:09 | iritkatriel | set | status: open -> pending nosy: + iritkatriel messages: + msg381048 |
| 2015年07月27日 11:20:57 | Drekin | set | messages: + msg247461 |
| 2013年08月26日 15:51:59 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg196216 |
| 2013年08月26日 09:05:07 | Drekin | create | |