Re: bufsize must be an integer in subprocess.Popen

2015-02-23 Thread Chris Angelico
On Mon, Feb 23, 2015 at 11:13 PM, Robert Clove wrote: > proc1=subprocess.Popen("/root/Desktop/abc.py","64","abc",shell=True,stdout=subprocess.PIPE, > stderr=subprocess.PIPE) As others have said, you need to use either a single command or a list of strings. But why are you using shell=True here? Y

Re: bufsize must be an integer in subprocess.Popen

2015-02-23 Thread INADA Naoki
> Hi, the parameter list should be a list of strings, not several unpacked > strings : > > command = ["/root/Desktop/abc.py","64","abc"] > proc1 = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, > stderr=subprocess.PIPE) > The first argument is list of string only when `shell

Re: bufsize must be an integer in subprocess.Popen

2015-02-23 Thread Shgck
On 23/02/2015 13:13, Robert Clove wrote: Hi All, I am using the Linux system with python, i am running the following script #!/usr/bin/python import threading import time import sys import subprocess import datetime import os import time import logging proc1=subprocess.Popen("/root/Des

Re: bufsize must be an integer in subprocess.Popen

2015-02-23 Thread INADA Naoki
When `shell=True`, the first argument should be string passed to shell. So you should: proc1=subprocess.Popen("/root/Desktop/abc.py 64 abc", shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE) On Mon, Feb 23, 2015 at 9:13 PM, Robert Clove wrote: > Hi All, > > I am using the Linux sys

bufsize must be an integer in subprocess.Popen

2015-02-23 Thread Robert Clove
Hi All, I am using the Linux system with python, i am running the following script #!/usr/bin/python import threading import time import sys import subprocess import datetime import os import time import logging proc1=subprocess.Popen("/root/Desktop/abc.py","64","abc",shell=True,stdout=su