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.

Author Ivan.Pozdeev
Recipients Ivan.Pozdeev
Date 2016-01-24.02:29:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453602542.98.0.731550634512.issue26189@psf.upfronthosting.co.za>
In-reply-to
Content
When running python.exe from windows console non-interactively, cmd.exe prompt appears immediately after starting:

C:\>python -c "import time; time.sleep(2); print 'bla-bla-bla'"

C:\>bla-bla-bla
<cursor here>

Not only this prevents from cmd to setting ERRORLEVEL to the return code, this makes it impossible to run scripts that expect input from console because Python and cmd get input lines in turns (I typed both inputs 2 times in the following example):

C:\>python -c "s=raw_input('1st:'); print s; s=raw_input('2nd:'); print s"

C:\>1st:abcdef
'abcdef' is not recognized as an internal or external command,
operable program or batch file.

C:\>abcdef
abcdef
2nd:123456
'123456' is not recognized as an internal or external command,
operable program or batch file.

C:\>123456
123456
<cursor here>
History
Date User Action Args
2016-01-24 02:29:03Ivan.Pozdeevsetrecipients: + Ivan.Pozdeev
2016-01-24 02:29:02Ivan.Pozdeevsetmessageid: <1453602542.98.0.731550634512.issue26189@psf.upfronthosting.co.za>
2016-01-24 02:29:02Ivan.Pozdeevlinkissue26189 messages
2016-01-24 02:29:02Ivan.Pozdeevcreate