[issue26897] [doc] Clarify Popen stdin, stdout, stderr

2022-02-25 Thread miss-islington
miss-islington added the comment: New changeset de2c91a89aa0e89d5d01d71697d0f27a9f60c11d by Miss Islington (bot) in branch '3.9': bpo-26897: Clarify Popen stdin, stdout, stderr file object docs (GH-30231) https://github.com/python/cpython/commit/de2c91a89aa0e89d5d01d71697d0f27a9f60c11d

[issue26897] [doc] Clarify Popen stdin, stdout, stderr

2022-02-25 Thread miss-islington
miss-islington added the comment: New changeset 1f956d11dbd952fed9b214a0c6e5fd9f91a1f4ca by Miss Islington (bot) in branch '3.10': bpo-26897: Clarify Popen stdin, stdout, stderr file object docs (GH-30231) https://github.com/python/cpython/commit/1f956d11dbd952fed9b214a0c6e5fd9f91a1f4ca

[issue26897] [doc] Clarify Popen stdin, stdout, stderr

2022-02-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +29711 pull_request: https://github.com/python/cpython/pull/31588 ___ Python tracker ___

[issue26897] [doc] Clarify Popen stdin, stdout, stderr

2022-02-25 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26897] [doc] Clarify Popen stdin, stdout, stderr

2022-02-25 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset dd69f734218ac5d3a551227069ac53ee09b0cd3e by Kumar Aditya in branch 'main': bpo-26897: Clarify Popen stdin, stdout, stderr file object docs (GH-30231) https://github.com/python/cpython/commit/dd69f734218ac5d3a551227069ac53ee09b0cd3e

[issue26897] [doc] Clarify Popen stdin, stdout, stderr

2022-02-25 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +29710 pull_request: https://github.com/python/cpython/pull/31587 ___ Python tracker

[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2022-02-23 Thread Min RK
Min RK added the comment: It appears that connect_read_pipe also doesn't accept pipes returned by `os.pipe`. If that's the case, what _does_ ProactorEventLoop.connect_read_pipe accept? I haven't been able to find any examples of `connect_read_pipe` that work on Windows, and every

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2022-02-03 Thread miss-islington
miss-islington added the comment: New changeset 91e888904478271c27c52c773863b41f5a8f7f30 by Miss Islington (bot) in branch '3.10': bpo-14916: use specified tokenizer fd for file input (GH-31006) https://github.com/python/cpython/commit/91e888904478271c27c52c773863b41f5a8f7f30 --

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2022-02-01 Thread miss-islington
Change by miss-islington : -- pull_requests: +29250 pull_request: https://github.com/python/cpython/pull/31065 ___ Python tracker ___

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2022-02-01 Thread miss-islington
miss-islington added the comment: New changeset 89b13042fcfc95bae21a49806a205ef62f1cdd73 by Paul m. p. P in branch 'main': bpo-14916: use specified tokenizer fd for file input (GH-31006) https://github.com/python/cpython/commit/89b13042fcfc95bae21a49806a205ef62f1cdd73 -- nosy:

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2022-01-28 Thread pmp-p
Change by pmp-p : -- pull_requests: +29187 pull_request: https://github.com/python/cpython/pull/31006 ___ Python tracker ___ ___

[issue26897] [doc] Clarify Popen stdin, stdout, stderr

2021-12-23 Thread Kumar Aditya
Change by Kumar Aditya : -- keywords: +patch nosy: +kumaraditya303 nosy_count: 3.0 -> 4.0 pull_requests: +28459 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30231 ___ Python tracker

[issue26897] [doc] Clarify Popen stdin, stdout, stderr

2021-12-05 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy title: Clarify Popen stdin, stdout, stderr -> [doc] Clarify Popen stdin, stdout, stderr versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker <

[issue43308] subprocess.Popen leaks file descriptors opened for DEVNULL or PIPE stdin/stdout/stderr arguments

2021-02-24 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43308] subprocess.Popen leaks file descriptors opened for DEVNULL or PIPE stdin/stdout/stderr arguments

2021-02-23 Thread cptpcrd
As part of its setup, Popen.__init__() calls Popen._get_handles(), which looks at the given stdin/stdout/stderr arguments and returns a tuple of 6 file descriptors (on Windows, file handles) indicating how stdin/stdout/stderr should be redirected. However, these file descriptors aren't properly

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2020-09-10 Thread pmp-p
Change by pmp-p : -- pull_requests: +21251 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22190 ___ Python tracker ___

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2020-09-10 Thread pmp-p
Change by pmp-p : -- versions: +Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2020-09-09 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2020-09-09 Thread pmp-p
pmp-p added the comment: all PyRun_InteractiveOne* functions are also affected it is really annoying when implementing repl behaviour when embedding( use cases : pyodide, android, wasi ) But I think the correct patch is : -char *newtok = PyOS_Readline(stdin, stdout, tok->pro

[issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected

2019-06-14 Thread Inada Naoki
Inada Naoki added the comment: On Sat, Jun 15, 2019 at 2:43 AM Eryk Sun wrote: > > Eryk Sun added the comment: > > > # Power Shell 6 (use cp65001 by default) > > PS C:¥> python3 -c "print('おはよう')" > ps.txt > > PowerShell standard I/O redirection is different from any shell I've ever > used.

[issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected

2019-06-14 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected

2019-06-14 Thread Eryk Sun
en python is called from > cmd.exe. In both cases the Python process inherits the console of the parent shell. The only way to run python.exe without a console is to use the CreateProcess creation flag DETACHED_PROCESS. > There is a relating issue: UTF-8 mode doesn't override > st

[issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected

2019-06-14 Thread Steve Dower
Steve Dower added the comment: Isn't the point that device_encoding(FD) gets the encoding of the specified file? In this case stdout? It seems odd that chcp doesn't actually update the console code page here, as that is its entire purpose. Perhaps TextIOWrapper is actually getting ACP

[issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected

2019-06-14 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +eryksun ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected

2019-06-13 Thread Inada Naoki
ed when python is called from Power Shell 6, but it is not attached when python is called from cmd.exe. I think using GetConsoleOutputCP() for non console is abusing. --- There is a relating issue: UTF-8 mode doesn't override stdin,stdout,stderr encoding when console is attached. On Unix, os.dev

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-05-28 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.9 ___ Python tracker ___

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-05-27 Thread Simon Bernier St-Pierre
Change by Simon Bernier St-Pierre : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-05-27 Thread miss-islington
miss-islington added the comment: New changeset f0d4c64019ecf8a5f362aa5a478786241613e5c3 by Miss Islington (bot) (sbstp) in branch 'master': bpo-36686: Improve the documentation of the std* params in loop.subprocess_exec (GH-13586)

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-05-26 Thread Simon Bernier St-Pierre
Change by Simon Bernier St-Pierre : -- keywords: +patch pull_requests: +13493 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13586 ___ Python tracker

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-05-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: Pull Request is welcome! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-04-20 Thread Simon Bernier St-Pierre
Simon Bernier St-Pierre added the comment: Could be cool to also mention that `encoding` / `errors` does not work yet. https://bugs.python.org/issue31087 -- ___ Python tracker

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-04-20 Thread Simon Bernier St-Pierre
New submission from Simon Bernier St-Pierre : I had trouble figuring out how to simply inherit stdin, stdout, or stderr in the asyncio.create_subprocess_exec / asyncio.subprocess_exec docs. My experiments show that passing either None or `sys.std*` works but the way the docs are written make

[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2018-09-11 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2018-09-11 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2018-09-11 Thread Martijn Pieters
Martijn Pieters added the comment: I'm trying to figure out why Windows won't let us do this. I think the reason is that sys.std(in|out) filehandles are not opened as pipes, and do not have the required OVERLAPPED flag set (see the CreateIoCompletionPort documentation at

[issue26897] Clarify Popen stdin, stdout, stderr

2016-05-07 Thread Martin Panter
Martin Panter added the comment: Yes, in all cases I understand it is just the file descriptor that matters. Perhaps any documentation update could also take Issue 24358 into account, which points out that compressed and buffered file object wrappers also cause inconsistencies in the data at

[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2016-05-01 Thread Gabriel Mesquita Cangussu
Gabriel Mesquita Cangussu added the comment: Terry, About your question, "Isn't there some other way to asynchronously read/file files, as opposed to sockets and pipes, on Windows?", that is exactly the problem I was trying to overcome, specifically for reading the stdin. On my research I

[issue26897] Clarify Popen stdin, stdout, stderr

2016-04-30 Thread Yclept Nemo
ty: normal status: open title: Clarify Popen stdin, stdout, stderr versions: Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26897> ___ __

[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2016-04-29 Thread Steve Dower
Steve Dower added the comment: Pipes and file handles are equivalent in Windows, but socket handles are their own namespace and have their own functions. Some Python code will switch between them automatically to make socket functions work with file descriptors, but generally I'd expect

[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2016-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: The surprise to me, being on Windows, is that the pipe connection methods sometimes work with non-pipes. The limitations of Windows event loops are given in https://docs.python.org/3/library/asyncio-eventloops.html#windows. The pipe connection functions are

[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2016-04-22 Thread Steve Dower
Steve Dower added the comment: > File "C:\Program Files\Python35\lib\asyncio\windows_events.py", line 606, in > _register_with_iocp > _overlapped.CreateIoCompletionPort(obj.fileno(), self._iocp, 0, 0) I don't think there's any case where this is going to work on an actual file -

[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2016-04-22 Thread Gabriel Mesquita Cangussu
u, gvanrossum, haypo, paul.moore, steve.dower, tim.golden, yselivanov, zach.ware priority: normal severity: normal status: open title: ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe type: behavior versions: Python 3.5 __

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2015-10-03 Thread Yauheni Kaliuta
Yauheni Kaliuta added the comment: Any progress with the problem? I just wanted to use the feature, but it looks like the bug.sh is still reproduces the bug. -- nosy: +Yauheni Kaliuta ___ Python tracker

Re: Python3 pickle vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-13 Thread John Nagle
On 3/12/2015 5:18 PM, John Nagle wrote: On 3/12/2015 2:56 PM, Cameron Simpson wrote: On 12Mar2015 12:55, John Nagle na...@animats.com wrote: I have working code from Python 2 which uses pickle to talk to a subprocess via stdin/stdio. I'm trying to make that work in Python 3. I'm starting

Re: Python3 pickle vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-13 Thread Steven D'Aprano
John Nagle wrote: I'm starting to think that the cpickle module, which Python 3 uses by default, has a problem. After the program has been running for a while, I start seeing errors such as File C:\projects\sitetruth\InfoSiteRating.py, line 200, in scansite if

Python3 pickle vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-12 Thread John Nagle
I have working code from Python 2 which uses pickle to talk to a subprocess via stdin/stdio. I'm trying to make that work in Python 3. First, the subprocess Python is invoked with the -d' option, so stdin and stdio are supposed to be unbuffered binary streams. That was enough in Python 2,

Re: Python3 pickle vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-12 Thread John Nagle
On 3/12/2015 2:56 PM, Cameron Simpson wrote: On 12Mar2015 12:55, John Nagle na...@animats.com wrote: I have working code from Python 2 which uses pickle to talk to a subprocess via stdin/stdio. I'm trying to make that work in Python 3. First, the subprocess Python is invoked with the -d'

Re: Python3 pickle vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-12 Thread Cameron Simpson
On 12Mar2015 12:55, John Nagle na...@animats.com wrote: I have working code from Python 2 which uses pickle to talk to a subprocess via stdin/stdio. I'm trying to make that work in Python 3. First, the subprocess Python is invoked with the -d' option, so stdin and stdio are supposed to be

Re: Python3 pickle vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-12 Thread Peter Otten
John Nagle wrote: I have working code from Python 2 which uses pickle to talk to a subprocess via stdin/stdio. I'm trying to make that work in Python 3. First, the subprocess Python is invoked with the -d' option, so stdin and stdio are supposed to be unbuffered binary streams. That

[issue15962] Windows STDIN/STDOUT Redirection is actually FIXED

2014-07-13 Thread Mark Lawrence
Mark Lawrence added the comment: This can be closed as out of date as extensive changes made to the Windows FAQ have removed the wording referenced in the patch. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org

[issue15962] Windows STDIN/STDOUT Redirection is actually FIXED

2014-07-13 Thread Brian Curtin
Changes by Brian Curtin br...@python.org: -- nosy: -brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15962 ___ ___ Python-bugs-list

[issue15962] Windows STDIN/STDOUT Redirection is actually FIXED

2014-07-13 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - out of date stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15962 ___

Re: Unicode stdin/stdout

2013-11-18 Thread Robin Becker
On 15/11/2013 18:16, random...@fastmail.us wrote: Of course, the real solution to this issue is to replace sys.stdout on windows with an object that can handle Unicode directly with the WriteConsoleW function - the problem there is that it will break code that expects to be able to use

Re: Unicode stdin/stdout

2013-11-18 Thread Robin Becker
On 18/11/2013 11:47, Robin Becker wrote: ... #c:\python33\lib\site-packages\sitecustomize.py import sys, codecs sys.stdout = codecs.getwriter(utf-8)(sys.stdout.detach()) sys.stderr = codecs.getwriter(utf-8)(sys.stderr.detach()) it seems that the above needs extra stuff to make

Re: [Python-ideas] Unicode stdin/stdout

2013-11-18 Thread Nick Coghlan
On 18 Nov 2013 22:36, Robin Becker ro...@reportlab.com wrote: On 18/11/2013 11:47, Robin Becker wrote: ... #c:\python33\lib\site-packages\sitecustomize.py import sys, codecs sys.stdout = codecs.getwriter(utf-8)(sys.stdout.detach()) sys.stderr =

Re: [Python-ideas] Unicode stdin/stdout

2013-11-18 Thread Victor Stinner
Why do you need to force the UTF-8 encoding? Your locale is not correctly configured? It's better to set PYTHONIOENCODING rather than replacing sys.stdout/stderr at runtime. There is an open issue to add a TextIOWrapper.set_encoding() method: http://bugs.python.org/issue15216 Victor --

Re: Unicode stdin/stdout

2013-11-18 Thread Robin Becker
On 18/11/2013 15:25, Victor Stinner wrote: Why do you need to force the UTF-8 encoding? Your locale is not correctly configured? It's better to set PYTHONIOENCODING rather than replacing sys.stdout/stderr at runtime. There is an open issue to add a TextIOWrapper.set_encoding() method:

Re: [Python-ideas] Unicode stdin/stdout

2013-11-18 Thread random832
On Mon, Nov 18, 2013, at 7:33, Robin Becker wrote: UTF-8 stuff This doesn't really solve the issue I was referring to, which is that windows _console_ (i.e. not redirected file or pipe) I/O can only support unicode via wide character (UTF-16) I/O with a special function, not via using byte-based

Re: [Python-ideas] Unicode stdin/stdout

2013-11-18 Thread Andrew Barnert
that, then constructs a TextIOWrapper with UTF-16 or the default encoding around that. At startup, you just do that for the three GetStdHandle handles, and that's your stdin, stdout, and stderr. Besides not being reusable enough for people who want to wrap HANDLEs from other libraries or attach to new consoles

Unicode stdin/stdout (was: Re: python 3.3 repr)

2013-11-15 Thread random832
Of course, the real solution to this issue is to replace sys.stdout on windows with an object that can handle Unicode directly with the WriteConsoleW function - the problem there is that it will break code that expects to be able to use sys.stdout.buffer for binary I/O. I also wasn't able to get

[issue19326] asyncio: child process exit isn't detected if its stdin/stdout/stderr FDs have been inherited by a child process

2013-10-21 Thread Charles-François Natali
FDs pointing to the original child's stdin/stdout/stderr. The following simple test will hang until the background 'sleep' exits: diff -r 47618b00405b Lib/test/test_asyncio/test_events.py --- a/Lib/test/test_asyncio/test_events.py Sat Oct 19 10:45:48 2013 +0300 +++ b/Lib/test/test_asyncio

[issue19326] asyncio: child process exit isn't detected if its stdin/stdout/stderr FDs have been inherited by a child process

2013-10-21 Thread Guido van Rossum
Changes by Guido van Rossum gu...@python.org: -- nosy: +gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19326 ___ ___ Python-bugs-list

[issue19326] asyncio: child process exit isn't detected if its stdin/stdout/stderr FDs have been inherited by a child process

2013-10-21 Thread Guido van Rossum
Guido van Rossum added the comment: This is by design. Let me try to defend the design. As long as one of the pipes is still open the parent might be interested in it. The Protocol object does get notified of the process's exit, via process_exited(), and if at that point it wants to be done,

[issue19326] asyncio: child process exit isn't detected if its stdin/stdout/stderr FDs have been inherited by a child process

2013-10-21 Thread Charles-François Natali
Charles-François Natali added the comment: This is by design. Let me try to defend the design. OK, if that's a know limitation, then that's fine. It would be nice to add maybe a note somewhere in the documentation, so that people don't get bitten by this (and also probably add a test for

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2013-03-25 Thread emmanuel
emmanuel added the comment: Kevin, I now fully agree with you. Regarding points 2 3 I dismissed modifying sys.stdin/out in python out of hand because it still would not allow to have a proper behaviour with two concurrent consoles on the same interpreter. Anyway this is not a very meaningful

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2013-03-25 Thread Kevin Barry
stdin/stdout for I/O, which libreadline in turn uses. I agree that it would be nice to get a Python developer involved, mostly because I expect things to break when this problem is fixed. Bad things happen when you think you've tested a lot of different cases that actually turn out

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2013-03-24 Thread Kevin Barry
Kevin Barry added the comment: emmanuel, Regarding your points: All three can be taken care of with a combination of my patch and setting sys.stdin, sys.stdout, and sys.stderr to the pty. (That should really be done internally with another patch, since os.fdopen is OS-specific. Also,

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2013-03-20 Thread emmanuel
emmanuel added the comment: Kevin, I've read more carefully your messages and investigated some more. It seems that there are several issues: 1/ To take input from a defined tty without interfering with standard file descriptors 2/ To have the result (object) of evaluation printed to a defined

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2013-03-18 Thread emmanuel
emmanuel added the comment: Kevin, These are good points. I had a cursory look at the python source code and observed the following: - There may also be a concern with stderr (used to print the prompt in PyOS_Readline) - PyOS_Readline has two different definitions in files pgenmain.c and

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2013-03-17 Thread emmanuel
Changes by emmanuel garcia6.emman...@wanadoo.fr: -- nosy: +emmanuel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14916 ___ ___ Python-bugs-list

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2013-03-17 Thread emmanuel
emmanuel added the comment: run the attached shell script to observe the bug ./bug.sh 0 - shows the bug ./bug.sh 1 - shows the expected behaviour (using a workaround) tested on linux with python 2.7 -- Added file: http://bugs.python.org/file29431/bug.sh

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2013-03-17 Thread emmanuel
Changes by emmanuel garcia6.emman...@wanadoo.fr: Added file: http://bugs.python.org/file29432/bug.sh ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14916 ___

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2013-03-17 Thread emmanuel
Changes by emmanuel garcia6.emman...@wanadoo.fr: Removed file: http://bugs.python.org/file29431/bug.sh ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14916 ___

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2013-03-17 Thread Kevin Barry
Kevin Barry added the comment: emmanuel, Thanks for the suggestion. Your workaround is exactly the same as using dup2 (in C) to replace stdin/stdout/stderr with the pty, however. If you added the following lines to your C code, it would have the same effect as the command-line redirection

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2013-03-17 Thread emmanuel
emmanuel added the comment: Kevin, Indeed the code I submitted can be written entirely in C using pipe fork execl dup2 etc. as you suggest. The only purpose of mixing bash and C is to have a short self-contained file showing the problem. Anyway, whether in C or bash the workaround is less

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2013-03-17 Thread Kevin Barry
Kevin Barry added the comment: One additional issue, which my patch doesn't address, is that PyRun_InteractiveLoop should really take *two* FILE* arguments, with the second one being optional. This is because on Linux (and presumably on other *nixes) if a read operation is blocked on a file

[issue15962] Windows STDIN/STDOUT Redirection is actually FIXED

2012-12-15 Thread Nacsa Kristóf
Nacsa Kristóf added the comment: @dhgmgn I think the change is ok. That said, I add two things. It maybe should be noted which Windows version has this corrected. The article contains this string: This problem was first corrected in Microsoft Windows 2000 Service Pack 4. This problem was

[issue15962] Windows STDIN/STDOUT Redirection is actually FIXED

2012-11-02 Thread Jan Duzinkiewicz
Jan Duzinkiewicz added the comment: I've referenced the kb article in the docs. Please let me know if the fix is ok - maybe the whole registry change process should be included in the docs directly? -- keywords: +patch nosy: +dhgmgn Added file:

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2012-10-08 Thread Kevin Barry
Kevin Barry added the comment: I still see the potential cause addressed by my patch in the 2.7, 3.3, and default branches, so I'm assuming that all versions from 2.6 on have this problem. I also see that I can elect to change the Status and Resolution of this report. Does that mean I need

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2012-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14916 ___ ___ Python-bugs-list mailing

[issue15962] Windows STDIN/STDOUT Redirection is actually FIXED

2012-09-18 Thread Nacsa Kristóf
if the docs could refer to this fix, as the docs is the major source of information for many. -- assignee: docs@python components: Documentation, Installation, Windows messages: 170641 nosy: Nacsa.Kristóf, docs@python priority: normal severity: normal status: open title: Windows STDIN/STDOUT

[issue15962] Windows STDIN/STDOUT Redirection is actually FIXED

2012-09-18 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy nosy: +brian.curtin, terry.reedy, tim.golden stage: - needs patch type: - enhancement versions: -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2012-07-24 Thread Kevin Barry
-cur++); } if (tok-prompt != NULL) { -char *newtok = PyOS_Readline(stdin, stdout, tok-prompt); +char *newtok = PyOS_Readline(tok-fp? tok-fp : stdin, (tok-fp tok-fp != stdin)? tok-fp : stdout, tok-prompt); if (tok-nextprompt != NULL

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2012-07-24 Thread Kevin Barry
Kevin Barry ta0k...@gmail.com added the comment: I've attached a simplified example program (working3.c) that demonstrates both the original problem and that the patch (Python-2.6.6-Run_Interactive-fix.patch) works. It eliminates the need for a pty, 'xterm', and redirection. Compile the

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2012-07-23 Thread Kevin Barry
Kevin Barry ta0k...@gmail.com added the comment: Here is a patch that corrects the problem (quoted below and attached.) This only corrects the problem when 'PyOS_ReadlineFunctionPointer' is set, e.g. you must 'import readline', otherwise Python will defer to stdin/stdout

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2012-07-23 Thread Kevin Barry
it with: ./working2 xterm -S/0 /dev/null /dev/null (The redirection shows that it works when stdin/stdout aren't a tty.) I looked at the most-recent revision of tokenizer.c (http://hg.python.org/cpython/file/52032b13243e/Parser/tokenizer.c) and see that the change in my patch above hasn't been made already

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2012-05-25 Thread Kevin Barry
of which should cause interactivity in the xterm to fail, indicating that Python is checking stdin/stdout for tty status when determining if it should run interactively (i.e. it's not checking the tty status of the file passed to PyRun_InteractiveLoop.) Am I somehow using this function wrong

[issue12337] Need real TextIOWrapper for stdin/stdout

2011-06-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: so there really was a bug. If fixed in 3.2.1, this issue could be closed. This issue is a duplicate of #11272: upgrade to Python 3.2.1. -- resolution: - duplicate status: open - closed

[issue12337] Need real TextIOWrapper for stdin/stdout

2011-06-17 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: WinXP, 3.2.0 type(sys.stdin) class 'idlelib.rpc.RPCProxy' sys.stdin.readline() a 'a\n' -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12337

[issue12337] Need real TextIOWrapper for stdin/stdout

2011-06-17 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I'm not sure what the point of your example is, Terry. Is it not fixed in 3.2.1? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12337

[issue12337] Need real TextIOWrapper for stdin/stdout

2011-06-17 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: That, like Antoine, I also could not reproduce, even in 3.2.0, when running under IDLE. However, with regular command line Python: Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] import sys sys.stdin.readline() a

[issue12337] Need real TextIOWrapper for stdin/stdout

2011-06-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I can't reproduce. Victor? Z:\defaultPCbuild\amd64\python_d.exe Python 3.3a0 (default, Jun 8 2011, 17:49:13) [MSC v.1500 64 bit (AMD64)] on win32 Type help, copyright, credits or license for more information. import sys sys.stdin.readline()

[issue12337] Need real TextIOWrapper for stdin/stdout

2011-06-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I think that this issue is a duplicate of the issue #11272: Python 3.2.1 has been released recently and contains the fix. Can you try this version Fan? -- ___ Python tracker

[issue12337] Need real TextIOWrapper for stdin/stdout

2011-06-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Note: Python 3.2 has another regression related to the Windows console (issue #11395), bug fixed in 3.2.1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12337

[issue12337] Need real TextIOWrapper for stdin/stdout

2011-06-14 Thread Fan Decheng
. -- components: IO messages: 138356 nosy: r_mosaic priority: normal severity: normal status: open title: Need real TextIOWrapper for stdin/stdout type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12337

[issue10480] cgi.py should document the need for binary stdin/stdout

2011-01-30 Thread Glenn Linderman
Glenn Linderman v+pyt...@g.nevcal.com added the comment: Fixed by issue 10841 and issue 4953. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10480 ___

[issue10480] cgi.py should document the need for binary stdin/stdout

2010-11-20 Thread Glenn Linderman
severity: normal status: open title: cgi.py should document the need for binary stdin/stdout versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10480

[issue10480] cgi.py should document the need for binary stdin/stdout

2010-11-20 Thread Glenn Linderman
Changes by Glenn Linderman v+pyt...@g.nevcal.com: -- assignee: - d...@python components: +Documentation nosy: +d...@python type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10480

Re: merge stdin, stdout?

2010-02-07 Thread Anssi Saari
jonny lowe jonny.lowe.12...@gmail.com writes: The result is the same as before. I've tested in fedora11. I don't think script is the answer here, since it only stores what's displayed on a terminal and your program's input comes from a file and is not displayed on the terminal. Simplest

Re: merge stdin, stdout?

2010-02-06 Thread jonny lowe
On Feb 5, 11:10 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Fri, 05 Feb 2010 17:39:07 -0300, jonny lowe jonny.lowe.12...@gmail.com escribió: On Feb 4, 8:20 pm, exar...@twistedmatrix.com wrote: On 01:56 am, jonny.lowe.12...@gmail.com wrote: What I want is to have an easy way

  1   2   >