[issue24888] FileNotFoundException raised by subprocess.call

2021-09-07 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks for the patch, DonnaDia! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue24888] FileNotFoundException raised by subprocess.call

2021-09-07 Thread miss-islington
miss-islington added the comment: New changeset 31be544721670516fa9700e088c022ff38b0c5fe by Miss Islington (bot) in branch '3.10': bpo-24888: Clarify subprocess.check_call propagates exceptions if unable to start process (GH-28018)

[issue24888] FileNotFoundException raised by subprocess.call

2021-09-07 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 2363910662cda4dcf574da68b4633b55e5fc0f9c by Miss Islington (bot) in branch '3.9': bpo-24888: Clarify subprocess.check_call propagates exceptions if unable to start process (GH-28018) (GH-28223)

[issue24888] FileNotFoundException raised by subprocess.call

2021-09-07 Thread miss-islington
Change by miss-islington : -- pull_requests: +26646 pull_request: https://github.com/python/cpython/pull/28224 ___ Python tracker ___

[issue24888] FileNotFoundException raised by subprocess.call

2021-09-07 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +26645 pull_request: https://github.com/python/cpython/pull/28223 ___ Python tracker

[issue24888] FileNotFoundException raised by subprocess.call

2021-09-07 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 19a304ba990481f0381a5316096b6b3cf2dff381 by DonnaDia in branch 'main': bpo-24888: Clarify subprocess.check_call propagates exceptions if unable to start process (GH-28018)

[issue24888] FileNotFoundException raised by subprocess.call

2021-08-29 Thread Padmashree Jha
Padmashree Jha added the comment: You have to add shell=True to execute a shell command. check_output is trying to find an executable. Try this -- nosy: +padmashreejha717 versions: -Python 3.4 ___ Python tracker

[issue24888] FileNotFoundException raised by subprocess.call

2021-08-28 Thread Diana
Change by Diana : -- keywords: +patch pull_requests: +26464 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28018 ___ Python tracker ___

[issue24888] FileNotFoundException raised by subprocess.call

2021-08-27 Thread Diana
Diana added the comment: Hi, I will work on this. I will create a pull request within 3 days. -- nosy: +DonnaDia ___ Python tracker ___

[issue24888] FileNotFoundException raised by subprocess.call

2021-06-19 Thread Irit Katriel
Irit Katriel added the comment: That said, the current wording does seem to imply that only CalledProcessErrors can be raised by this function so it might be worth clarifying that other exceptions can occur if the command could not run at all (without enumerating the precise exceptions).

[issue24888] FileNotFoundException raised by subprocess.call

2021-06-18 Thread Irit Katriel
Irit Katriel added the comment: The FileNotFoundException exception is coming from the Popen call, and the docs for subprocess.check_call already mention that it delegates to Popen. There are quite a few different exceptions that Popen could raise, so I think David's general comment is

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset 390bfe044531a813722919933116ed37fe321861 by Miss Islington (bot) in branch '3.9': bpo-23750: Document os-system, subprocess. Patch by Martin Panter. (GH-26016) (GH-26041)

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-11 Thread Senthil Kumaran
Change by Senthil Kumaran : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset 6fc6f4366d02412e3424d2a6da43a28d8f479d7b by Miss Islington (bot) in branch '3.10': bpo-23750: Document os-system, subprocess. Patch by Martin Panter. (GH-26016) (GH-26040)

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-11 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +24685 pull_request: https://github.com/python/cpython/pull/26040 ___ Python tracker

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-11 Thread miss-islington
Change by miss-islington : -- pull_requests: +24686 pull_request: https://github.com/python/cpython/pull/26041 ___ Python tracker ___

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: Does anyone know what the return value 768 signify here? -- nosy: +orsenthil ___ Python tracker ___

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-10 Thread So Ukiyama
So Ukiyama added the comment: I created a PR which apply Martin Panter's patch. So If I have offended you with my rudeness, I hope you will forgive me for taking this down. -- ___ Python tracker

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-10 Thread So Ukiyama
Change by So Ukiyama : -- nosy: +uniocto nosy_count: 4.0 -> 5.0 pull_requests: +24666 pull_request: https://github.com/python/cpython/pull/26016 ___ Python tracker ___

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-04-28 Thread Irit Katriel
Irit Katriel added the comment: The patch needs to be converted to a github PR. -- keywords: +easy nosy: +iritkatriel title: Clarify difference between os.system/subprocess.call in section "Replacing os.system()" -> doc: Clarify difference between os.system/su

[issue34615] subprocess.call wrong exit code

2018-09-11 Thread Kay Hayen
Kay Hayen added the comment: So I was confused indeed. Actually I am observing in other tests at least, that apparently Nuitka compiled execution in my tests can import _testcapi module, which normal execution of the test does not manage. Then there is the possibility that the exit code

[issue34615] subprocess.call wrong exit code

2018-09-09 Thread Kay Hayen
Kay Hayen added the comment: I think that the whole reason I was doing this, is because with "os.execl" on Windows, the exit code was always lost, but of course it is very important and "subprocess.call" promises to return it. I just tried if 3.7 has any better exit

[issue34615] subprocess.call wrong exit code

2018-09-09 Thread Kay Hayen
New submission from Kay Hayen : Hello there, I am probably confusing myself. I am using this kind of code in Nuitka to emulate "os.execl" on Windows, and so far it never let me down: r = subprocess.call( args, she

[issue25942] Add a new optional cleanup_timeout parameter to subprocess.call()

2018-01-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset f4d644f36ffb6cb11b34bfcf533c14cfaebf709a by Gregory P. Smith in branch 'master': bpo-25942: make subprocess more graceful on ^C (GH-5026) https://github.com/python/cpython/commit/f4d644f36ffb6cb11b34bfcf533c14cfaebf709a

[issue25942] Add a new optional cleanup_timeout parameter to subprocess.call()

2017-12-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: you'll notice I added an alternate PR. I don't like the complication of adding yet another knob (cleanup_timeout) to subprocesses already giant API surface. It will rarely be used. My PR tries to take a practical approach: Just wait a

[issue25942] Add a new optional cleanup_timeout parameter to subprocess.call()

2017-12-27 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +4914 ___ Python tracker ___ ___

[issue25942] Add a new optional cleanup_timeout parameter to subprocess.call()

2017-11-06 Thread STINNER Victor
STINNER Victor <victor.stin...@gmail.com> added the comment: I changed the issue title to "Add a new optional cleanup_timeout parameter to subprocess.call()" to make it more positive and update it to the currently proposed change ;-) -- title: subprocess.call SIGKIL

[issue25942] subprocess.call SIGKILLs too liberally

2017-11-05 Thread Martin Panter
Martin Panter added the comment: https://github.com/python/cpython/pull/4283 adds a secondary timeout, which defaults to 1 s when there is no main timeout. But this seems complicated and arbitrary. As I understand, the main use case discussed here was waiting without a

[issue25942] subprocess.call SIGKILLs too liberally

2017-11-04 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.7 -Python 3.5 ___ Python tracker ___

[issue25942] subprocess.call SIGKILLs too liberally

2017-11-04 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker ___

[issue25942] subprocess.call SIGKILLs too liberally

2017-11-04 Thread Stuart Berg
Change by Stuart Berg : -- pull_requests: +4245 ___ Python tracker ___ ___

[issue1759845] [2.7] subprocess.call fails with unicode strings in command line

2017-10-04 Thread STINNER Victor
Change by STINNER Victor <victor.stin...@gmail.com>: -- title: subprocess.call fails with unicode strings in command line -> [2.7] subprocess.call fails with unicode strings in command line ___ Python tracker <rep...@bugs.python

[issue1759845] subprocess.call fails with unicode strings in command line

2017-10-04 Thread Safihre
Safihre added the comment: Although this issue is very old, in case anyone else like us need this functionality I created a package that implements the proposed C-fix. https://pypi.python.org/pypi/subprocessww Simply "import subprocessww" and POpen is patched. We tested it

[issue30922] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @sanky8793 please, use the python-list for that https://mail.python.org/mailman/listinfo/python-list Thank you -- nosy: +matrixise -gvanrossum priority: normal -> low stage: -> resolved status: open -> closed ___

Re: Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Rhodri James
On 13/07/17 16:42, sanky8...@gmail.com wrote: I have created one thread in python, and that thread is running in infinite loop, but when I was trying to kill a process by making use of subprocess.call("my ps command") Its not actually working Here is the code, import thread

[issue30922] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Sanket
Sanket added the comment: Can i get solution here -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue30922] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Guido van Rossum
while True: > break > cmd="ps -ef | grep 'shell' | awk '{print $2}' | xargs kill -9" > subprocess.call(cmd, shell=True) > > > def A(): > th = threading.Thread(target=B) > th.start() > > > > > In above code, process with name

[issue30922] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Sanket
New submission from Sanket: import threading import subprocess def B(): while True: break cmd="ps -ef | grep 'shell' | awk '{print $2}' | xargs kill -9" subprocess.call(cmd, shell=True) def A(): th = threading.Thread(target=B) th.start() In above code

Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread sanky8793
I have created one thread in python, and that thread is running in infinite loop, but when I was trying to kill a process by making use of subprocess.call("my ps command") Its not actually working Here is the code, import threading import subprocess def B(): while True:

[issue30921] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Guido van Rossum
Guido van Rossum added the comment: Please find a list like python-list (comp.lang.python) to ask for help with your problem. Also please stop adding people to the nosy list. -- stage: -> resolved status: open -> closed ___ Python tracker

[issue30921] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Sanket
Changes by Sanket : -- nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list

[issue30921] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Sanket
Changes by Sanket : -- nosy: +lars.gustaebel, lemburg, pedronis ___ Python tracker ___

[issue30921] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Sanket
Changes by Sanket : -- nosy: +djc, gvanrossum -sanky8793 ___ Python tracker ___ ___

[issue30921] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Sanket
New submission from Sanket: import threading import subprocess def B(): while True: break cmd="ps -ef | grep 'shell' | awk '{print $2}' | xargs kill -9" subprocess.call(cmd, shell=True) def A(): th = threading.Thread(target=B) th.start() In above code

[issue25942] subprocess.call SIGKILLs too liberally

2016-04-19 Thread Mike Pomraning
Mike Pomraning added the comment: Re: #2, I'd rather have a zombie than a hard kill on a child whose code I perhaps don't control. Zombies are a fact of life (er, a fact of undeath?) in UNIX process management, and are the historical and IMHO expected behavior. --

[issue25942] subprocess.call SIGKILLs too liberally

2016-04-16 Thread Martin Panter
Martin Panter added the comment: I don’t think Victor likes #2 because of the zombie. I would be interested in #4 (one of the documented purposes of subprocess is to replace os.system), but it might need careful consideration and discussion. Ignoring signals is such a significant change I

[issue25942] subprocess.call SIGKILLs too liberally

2016-04-14 Thread Mike Pomraning
Mike Pomraning added the comment: #2 and #4 are the only predictable and palatable options, I think. Ignore the patch that started this issue. -- ___ Python tracker

[issue25942] subprocess.call SIGKILLs too liberally

2016-04-12 Thread Martin Panter
Martin Panter added the comment: When no timeout is specified, these are the options as I see them: 1. SIGKILL child immediately on the first KeyboardInterrupt (Victor’s behaviour since 3.3) 2. Give up and leave a zombie after the first KeyboardInterrupt (pre-3.3 behaviour) 3. Wait again

[issue25942] subprocess.call SIGKILLs too liberally

2016-04-12 Thread Mike Pomraning
. Handling a child process behind a convenience interface, like system() or subprocess.call(), is inherently a bit tricky when things go wrong. My expectation for .call() would be that it behave something like os.system() (or the C library system() for that matter) and _not_ be interrupted

[issue25942] subprocess.call SIGKILLs too liberally

2016-04-12 Thread Martin Panter
Martin Panter added the comment: I don’t know how it works on Windows, but on Unix in most cases the parent and child will share a controlling terminal. Pressing Ctrl+C in the terminal will broadcast SIGINT to all processes, parent and child. That is probably why os.system() ignores SIGINT.

[issue25942] subprocess.call SIGKILLs too liberally

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: Again, the problem is that the exception exits from the function which owns the last reference to the Popen object. If the Popen is left alive when you exit the function, you create a zombi process, you can leave open pipes, etc. It's unclear to me if CTRL+c

[issue25942] subprocess.call SIGKILLs too liberally

2016-04-04 Thread Martin Panter
Martin Panter added the comment: Even if we can’t agree on any behaviour change, I think it might be worth documenting how these functions behave on exceptions (interrupts) other than TimeoutExpired. Currently all I can find is “If the timeout expires, the child process will be killed and

[issue25942] subprocess.call SIGKILLs too liberally

2016-04-04 Thread Robert Cope
Changes by Robert Cope : -- nosy: +rpcope1 ___ Python tracker ___ ___ Python-bugs-list

[issue26400] SyntaxError when running Python 2.7 interpreter with subprocess.call

2016-02-21 Thread giumas
giumas added the comment: It worked also for me with the official 64-bit distribution! I get that buggy behavior with the Anaconda distribution (this was the "Library\bin"). I should have checked it as first step! My apologies and thank you so much for your kind help. -- resolution:

[issue26400] SyntaxError when running Python 2.7 interpreter with subprocess.call

2016-02-21 Thread Eryk Sun
Eryk Sun added the comment: Your example worked fine for me with the official 64-bit distribution of 2.7.10 installed in "C:\Program Files\Python27" on Windows 10. I created a junction from "C:\Py27x64" to the 2.7 installation directory in order to run the example as provided. This issue

[issue26400] SyntaxError when running Python 2.7 interpreter with subprocess.call

2016-02-21 Thread giumas
giumas added the comment: No, I don't. I have just double-checked it. Did you try to run my minimal example on your machine? If yes, are you getting the same behavior? -- ___ Python tracker

[issue26400] SyntaxError when running Python 2.7 interpreter with subprocess.call

2016-02-21 Thread Eryk Sun
Eryk Sun added the comment: The error you're getting indicates that stdin is set to binary mode for some reason. You can see this using the -u command line option: C:\>py -2 -u Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on win32 Type "help",

[issue26400] SyntaxError when running Python 2.7 interpreter with subprocess.call

2016-02-21 Thread giumas
New submission from giumas: On Windows, I am getting a `SyntaxError` when I try to input commands after having launched a Python 2.7.x interpreter with `subprocess.call`. This is a minimal example: import os import subprocess def python_env_path(python_path

[issue25942] subprocess.call SIGKILLs too liberally

2016-01-01 Thread Martin Panter
Martin Panter added the comment: The reported problem is when no timeout is given. Perhaps it would be sufficient to: 1. Kill the child if any exception happens when a timeout is enforced 2. Never kill the child when there is no timeout If a timeout is specified, the current code is good

[issue25942] subprocess.call SIGKILLs too liberally

2016-01-01 Thread Martin Panter
Martin Panter added the comment: Doesn’t this scenario apply equally to run(), or check_output() in 3.4? I suspect the explicit p.wait() call is not needed either. The context manager should already be calling wait(). One possible problem that I can think of: if you set a timeout, then

[issue25942] subprocess.call SIGKILLs too liberally

2016-01-01 Thread STINNER Victor
STINNER Victor added the comment: The issue explained in 12494 is that the caller doesn't have access to the subprocess.Popen object. I disagree to not kill the process when an exception is raised, even KeyboardInterrupt. I also disagree to say that we kill an "arbitrary" process. IMHO it's

[issue25942] subprocess.call SIGKILLs too liberally

2015-12-28 Thread SilentGhost
SilentGhost added the comment: The code was introduced to solve issue 12494, so I'm adding Victor to weigh in. -- nosy: +SilentGhost, haypo versions: +Python 3.5, Python 3.6 -Python 3.3 ___ Python tracker

[issue25942] subprocess.call SIGKILLs too liberally

2015-12-28 Thread Mike Pomraning
, a UserDefinedTimeoutException from a signal handler, etc. That's probably the lesser of two evils, the other being a SIGKILL against an arbitrary child process. Better to document that a non-timeout-parameter interruption to subprocess.call will separate the parent from its child, than to hard kill arbitrary

[issue25942] subprocess.call SIGKILLs too liberally

2015-12-24 Thread Mike Pomraning
New submission from Mike Pomraning: Python 3.3 introduces timeout support in subprocess.call, implemented by sending a SIGKILL if the Popen.wait is interrupted by a TimeoutExpired exception. However, the "except" clause is too broad, and will, for instance, trigger on a Keyboar

Re: subprocess.call with non-ASCII arguments?

2015-12-16 Thread Ulli Horlacher
Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote: > >I want to create a zip file within a Python 2.7 program on windows. > > > >My code: > > > > cmd = ['7za.exe','a','-tzip',archive] + files > > status = subprocess.call(cmd) > > > My fir

Re: subprocess.call with non-ASCII arguments?

2015-12-15 Thread Ulli Horlacher
Dennis Lee Bieber wrote: > Python has a zipfile library that is portable between OS. Along with > libraries for gzip, bzip2, and tarfiles... Ohh.. this is new to me! https://docs.python.org/2/library/tarfile.html https://docs.python.org/2/library/zipfile.html

subprocess.call with non-ASCII arguments?

2015-12-15 Thread Ulli Horlacher
I want to create a zip file within a Python 2.7 program on windows. My code: cmd = ['7za.exe','a','-tzip',archive] + files status = subprocess.call(cmd) leads to: File "fexit.py", line 971, in sendfile_retry status = subprocess.call(cmd) File "C:\Python27\lib\subpr

subprocess.call with non-ASCII arguments?

2015-12-15 Thread Ulli Horlacher
(My first posting seems to got lost) I want to create a zip file within a Python 2.7 program on windows. My code: cmd = ['7za.exe','a','-tzip',archive] + files status = subprocess.call(cmd) leads to: File "fexit.py", line 971, in sendfile_retry status = subprocess.call(c

Re: subprocess.call with non-ASCII arguments?

2015-12-15 Thread Laura Creighton
In a message of Tue, 15 Dec 2015 14:25:50 +, Ulli Horlacher writes: >(My first posting seems to got lost) > >I want to create a zip file within a Python 2.7 program on windows. > >My code: > > cmd = ['7za.exe','a','-tzip',archive] + files > status = subpr

Re: subprocess.call with non-ASCII arguments?

2015-12-15 Thread Ulli Horlacher
7z feature. > > New code: > > fileslist = archive + '.list' > flo = open(fileslist,'w') > for file in files: print(file,file=flo) > flo.close() > cmd = ['7za.exe','a','-tzip',archive,'@'+fileslist] > status = subprocess.call(cmd) > > > But with that I get a n

[issue24888] FileNotFoundException raised by subprocess.call

2015-08-18 Thread Geoffrey Royer
Changes by Geoffrey Royer geoffrey.ro...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24888 ___ ___

[issue24888] FileNotFoundException raised by subprocess.call

2015-08-18 Thread R. David Murray
R. David Murray added the comment: We don't in general document all the exceptions that can be raised by a piece of code. This could be an edge case, though. Let's see what others thing. -- nosy: +r.david.murray ___ Python tracker

[issue24888] FileNotFoundException raised by subprocess.call

2015-08-18 Thread R. David Murray
R. David Murray added the comment: think. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24888 ___ ___ Python-bugs-list mailing list

[issue24793] Calling 'python' via subprocess.call ignoring passed %PATH%

2015-08-05 Thread Gregor
New submission from Gregor: I just noticed that there is a litte inconvenience when I try to invoke 'python' via subprocess.call passing an environment (%PATH%) from a script. I pass an environment where %PATH% only contains one directory where a python2.7.3-exe is present (I checked

[issue24793] Calling 'python' via subprocess.call ignoring passed %PATH%

2015-08-05 Thread Paul Moore
to the executable - subprocess.call([C:\\Python34\\python.exe]). -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24793

[issue24793] Calling 'python' via subprocess.call ignoring passed %PATH%

2015-08-05 Thread eryksun
eryksun added the comment: Popen calls Windows [CreateProcess][1]. If the Popen executable argument isn't used or if the file from the command line doesn't include a directory path, then CreateProcess searches for it in the following directories: 1. The directory from which the

[issue23750] Clarify difference between os.system/subprocess.call in section Replacing os.system()

2015-06-22 Thread Martin Panter
Martin Panter added the comment: Here is a patch: * Use different return value variable names and point out that they are encoded differently * Add another bullet point about signal handling * Fix os.system() documentation of the return value. My understanding is it is the C standard that

[issue23750] Clarify difference between os.system/subprocess.call in section Replacing os.system()

2015-03-23 Thread Andreas Sommer
New submission from Andreas Sommer: Reading over the section Replacing os.system() (https://docs.python.org/2/library/subprocess.html#replacing-os-system), one might assume that the return value of os.system and subprocess.call are equivalent. status = os.system(mycmd + myarg

[issue23750] Clarify difference between os.system/subprocess.call in section Replacing os.system()

2015-03-23 Thread Martin Panter
); import os; print(Returned, os.system(sleep 3 exit 3))' Waiting ^CReturned 2 # Hit Ctrl+C during sleep command $ python3 -c 'print(Sleeping); import subprocess; print(Returned, subprocess.call(sleep 3 exit 3, shell=True))' Sleeping Returned 3 $ python3 -c 'print(Sleeping); import subprocess; print

[issue22712] Add 'input' argument to subprocess.check_call and subprocess.call

2014-10-23 Thread zodalahtathi
New submission from zodalahtathi: Python 3.4 added a 'input' argument to the subprocess.check_output function to send bytes to stdin, but it was surprisingly not added to other subprocess helpers. The same functionality should be added to subprocess.check_call and subprocess.call

[issue22712] Add 'input' argument to subprocess.check_call and subprocess.call

2014-10-23 Thread R. David Murray
R. David Murray added the comment: call and check_call are designed as APIs that do *not* manage the standard streams of the commands called. If you want to manage the streams, either use check_output or Popen directly. Internally, call and check call do *not* use communicate, and it is

[issue22712] Add 'input' argument to subprocess.check_call and subprocess.call

2014-10-23 Thread zodalahtathi
zodalahtathi added the comment: I think the 'stdin argument can be any file like or stream for all subprocess functions' approach would be the best solution, because it is misleading to differentiate behavior based on internal implementation details (the use of communicate), when the function

[issue22712] Add 'input' argument to subprocess.check_call and subprocess.call

2014-10-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Then I'm closing this issue. -- resolution: - rejected stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22712 ___

[issue21392] Python on Cygwin: subprocess.call BlockingIOError: [Errno 11] Resource temporarily unavailable

2014-05-05 Thread dellair jie
dellair jie added the comment: Eric, Very much appreciated for your offer to help. This issue is with Cygwin fork(), documented here: http://cygwin.com/faq.html#faq.using.fixing-fork-failures I am closing the issue. Have a great day! -- resolution: - not a bug status: open - closed

[issue21392] Python on Cygwin: subprocess.call BlockingIOError: [Errno 11] Resource temporarily unavailable

2014-04-30 Thread dellair jie
= os.umask (umask) if interrupt: for idex, item in enumerate (__signalList): if item: signal.signal (idex, interrupt) __signal = 0 returnData[rawstatus] = subprocess.call (cmd, stdout = stdOutHandle

[issue21392] Python on Cygwin: subprocess.call BlockingIOError: [Errno 11] Resource temporarily unavailable

2014-04-30 Thread dellair jie
Changes by dellair jie dell...@gmail.com: -- components: +IO type: - resource usage ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21392 ___ ___

[issue21392] Python on Cygwin: subprocess.call BlockingIOError: [Errno 11] Resource temporarily unavailable

2014-04-30 Thread Eric V. Smith
Eric V. Smith added the comment: Can you provide a working example? How are you calling execute()? What are __signal and __signalList set to? Note that the default of None for cmd can't ever work, due to calling re.match (\s, cmd). -- nosy: +eric.smith

[issue21392] Python on Cygwin: subprocess.call BlockingIOError: [Errno 11] Resource temporarily unavailable

2014-04-30 Thread dellair jie
dellair jie added the comment: The value of __signal and __signalList: __signal=0 __signalList=[None] * 256 __signalList[signal.SIGHUP] = signalHandler __signalList[signal.SIGQUIT] = signalHandler __signalList[signal.SIGUSR1] = signalHandler __signalList[signal.SIGUSR2] =

[issue21392] Python on Cygwin: subprocess.call BlockingIOError: [Errno 11] Resource temporarily unavailable

2014-04-30 Thread Eric V. Smith
Eric V. Smith added the comment: I'd like to help with this, but unless you can provide a script I can run that shows the problem, I can't. I don't have the time to figure out what parameters I need to pass in to cause the problem. Sorry. -- ___

[issue20894] COMSPEC with multiple paths breaks subprocess.call

2014-03-12 Thread Elja van Tol
New submission from Elja van Tol: I tried a simple console command: import subprocess subprocess.call([dir], shell=True) Which failed with an WindowsError 2, (could not find file) After much googling i found out that this is caused by os.environ['COMSPEC'] (http://stackoverflow.com/questions

[issue20894] COMSPEC with multiple paths breaks subprocess.call

2014-03-12 Thread Yury Selivanov
Changes by Yury Selivanov yselivanov...@gmail.com: -- nosy: +brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20894 ___ ___

[issue20894] COMSPEC with multiple paths breaks subprocess.call

2014-03-12 Thread R. David Murray
R. David Murray added the comment: This was a misconfiguration of your system. It is not a bug in Python. (Unless can find a microsoft reference that says that COMPSPEC can contain more than one path? I don't think you will; see, eg:

[issue20894] COMSPEC with multiple paths breaks subprocess.call

2014-03-12 Thread Elja van Tol
Elja van Tol added the comment: I stand corrected, now i have to find out why my comspec was filled with nonsense. Sorry for the trouble! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20894

RE: subprocess.call

2013-04-19 Thread Ombongi Moraa Fe
Hi Team, In my python script, I have this: command=lynx -dump 'phpscript?param1=%sparam2=%sparam3=%sparam4=%sparam5=%s'%(value1,value2,value3,value4) result=subprocess.call(command,shell=True) print 'xml message' However, the response from running the php script is also printed on output

Re: subprocess.call

2013-04-19 Thread Mau C
Il 19/04/2013 11:56, Ombongi Moraa Fe ha scritto: Hi Team, In my python script, I have this: command=lynx -dump 'phpscript?param1=%sparam2=%sparam3=%sparam4=%sparam5=%s'%(value1,value2,value3,value4) http://docs.python.org/2/library/subprocess.html#module-subprocess You should set the

Re: subprocess.call

2013-04-19 Thread Jens Thoms Toerring
Ombongi Moraa Fe moraa.lovetak...@gmail.com wrote: [-- text/plain, encoding 7bit, charset: ISO-8859-1, 19 lines --] In my python script, I have this: command=lynx -dump 'phpscript?param1=%sparam2=%sparam3=%sparam4=%sparam5=%s'%(value1,value2,value3,value4) result=subprocess.call(command

Windows subprocess.call problem

2013-01-21 Thread Tom Borkin
Hi; I have this code: #!/Python27/python import os, subprocess, sys lyrics_path = /Users/Tom/Documents/lyrics os.chdir(lyrics_path) songs = ['livin-la-vida-loca', 'whos-that-lady'] for song in songs: subprocess.call(['notepad.exe', '%s.txt' % song]) my_songs_path = aa english lyrics os.chdir

Re: Windows subprocess.call problem

2013-01-21 Thread Tim Golden
On 21/01/2013 11:25, Tom Borkin wrote: Hi; I have this code: #!/Python27/python import os, subprocess, sys lyrics_path = /Users/Tom/Documents/lyrics os.chdir(lyrics_path) songs = ['livin-la-vida-loca', 'whos-that-lady'] for song in songs: subprocess.call(['notepad.exe', '%s.txt

Re: Windows subprocess.call problem

2013-01-21 Thread Nobody
advise. If you want to be able to keep track of the child process (e.g. to determine when it has finished), use subprocess.Popen(). If you just want to fire and forget, use the start shell command, e.g.: subprocess.call(['start', 'notepad.exe', '%s.txt' % song], shell=True) -- http

Re: Windows subprocess.call problem

2013-01-21 Thread Dave Angel
On 01/21/2013 06:25 AM, Tom Borkin wrote: Hi; I have this code: snip for song in my_songs: subprocess.call(['notepad.exe', '%s.txt' % song]) print song It opens the first song and hangs on subsequent songs. It doesn't open the next song or execute the print until I have closed the first

  1   2   3   >