Subprocess communication issues Programming Software Development by ajamin …:\setup-winnt.exe", "-console"), stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE) stdout_text, stderr_text = p.communicate(command) sys.stdout… Re: subprocess.call error Programming Software Development by vegaseat subprocess.call(["program-name", "arg1", "arg2"]) takes an executable program with arguments. You are giving it an html script code. That won't work! Subprocess.Call Help Programming Software Development by NotWorking …kwargs).wait() File "/usr/lib/python2.6/subprocess.py", line 621, in __init__ errread, errwrite…) File "/usr/lib/python2.6/subprocess.py", line 1126, in _execute_child raise child_exception… (for arguments) and quotations. E.G. [CODE]subprocess.call ('/usr/bin/command -argument "option"… Re: subprocess Programming Software Development by ZZucker Give this a try and see if it works: import subprocess subprocess.call(['posidbfw', '/alt', '1', '1']) subprocess Programming Software Development by TheNational22 I have a software that use command line arguments to create files. You go to the directory, type posidbfw /alt 1 1, it creates the files. I want to call this from one line. I was using subprocess.Popen, but it doesn't see the arguements, any help? Re: subprocess Programming Software Development by TheNational22 Great!! Thanks! One more question. Is there a way to use this, but make the 1 1 standard, and be able to pass an argument over? So, I type subprocess.py, it runs with 1 1, but if I want to do it with 2 2, I could tpye that on a command line and parse it over. Re: subprocess Programming Software Development by sneekula … be able to pass an argument over? So, I type subprocess.py, it runs with 1 1, but if I want… Subprocess Call Programming Software Development by felix001 Does anyone know how to use the subprocess.call to assign the ouput of a command to a string. At the moment it only assigns the return code ?? [CODE]>>> hostname = call(["hostname", "-d"]) lon3.corp.rackspace.com >>> print hostname 0[/CODE] Thanks, Subprocess Programming Software Development by Plastico Bolha Hi peoople, My doubt is: how to make a "process" go to "sub-process" ? (in Ctrl+Alt+del) I know that the response this in "import subprocess", but I can't organize this ideia. I need of a help. Thank you patience :icon_wink: subprocess module issues Programming Software Development by zachabesh …),self.flv) [B]self.command = subprocess.Popen(ffmpeg_line, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)[/B] def encode(…line 40, in __init__ self.command = subprocess.Popen(ffmpeg_line, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False) File "C:\… Re: subprocess.Popen() question Programming Software Development by afireinside ….exe","D:\\MyDataExtractor\\extractSerialNumbers.pl"], stdout=subprocess.PIPE, stdin= subprocess.PIPE) for infile in glob.glob(self.dirfilename + '\\*\\*.txt….exe","D:\\MyDataExtractor\\extractSerialNumbers.pl"], stdout=subprocess.PIPE, stdin= subprocess.PIPE) for infile in glob.glob(self.dirfilename + '\\*\\*.txt… subprocess.call error Programming Software Development by sravan953 …run_program(): current=time.asctime() print 'Runnning program'+' ['+current+']' subprocess.call(read_site) def check_argument(): current=time.asctime() if read_site=='':…in __init__ errread, errwrite) File "C:\Python26\lib\subprocess.py", line 804, in _execute_child startupinfo) WindowsError: … Re: subprocess module issues Programming Software Development by jlm699 … out the contents of [icode]ffmpeg_line[/icode] before calling the subprocess to make sure you've actually constructed the proper system… Re: Subprocess stdout readline block Programming Software Development by Gribouillis …made a little program which can read from a subprocess' stdout in a non blocking way. I start… .join () def testme (): """Start a subprocess and read its stdout in a non blocking way"…;"" import subprocess prog ="pipetest.py" child =subprocess .Popen ( "python %s&… Re: Subprocess stdout readline block Programming Software Development by Gribouillis … socketpair, and we pass Socket.fileno() as subprocess Popen's stdout argument. """…socket .socketpair () prog ="pipetest.py" child =subprocess .Popen ( ["python",prog ], #shell=True,… stdout =childsock .fileno (),#subprocess.PIPE, #close_fds = False, ) sock .settimeout (1.… Subprocess Module Confusion Programming Software Development by bgk111 …CODE] #!/usr/bin/env python import sys import os import subprocess import time os.system('clear') trythis1 = 'grass -text…newest shape file" proc = subprocess.Popen(trythis1, shell=True, stdin=subprocess.PIPE) proc.stdin.write(trythis2) proc…to make my primary program wait for the subprocess to complete so that things are done in… subprocess.Popen() question Programming Software Development by afireinside …txt'): f = open(infile) reportString = f.read() f.close() numberExtractor = subprocess.Popen(["C:\\Perl\\bin\\perl5.10.0.exe"…;,"D:\\MyDataExtractor\\extractSerialNumbers.pl" , reportString], stdout=subprocess.PIPE, stdin= subprocess.PIPE) r = numberExtractor.communicate() #print r[/CODE] Using… Re: Subprocess stdout readline block Programming Software Development by retrograde … blocking read calls: [code=python] import subprocess kernel = subprocess.Popen("kernel", stdin=subprocess.PIPE, stdout=subprocess.PIPE) msg = kernel.stdout.readline() # blocks… Re: subprocess.call error Programming Software Development by sravan953 [QUOTE=vegaseat;889523]subprocess.call(["program-name", "arg1", "arg2"]) takes an executable program with arguments. You are giving it an html script code. That won't work![/QUOTE] Yeah but, I have made sure that in the webpage, there is only text and no HTML tags...so basically it should work right? Re: Subprocess Module Confusion Programming Software Development by bgk111 …: [CODE]#!/usr/bin/env python import sys import os import subprocess os.system('clear') #Location of shape files to create vectors… statements to clean out old variables proc = subprocess.Popen(OPENGRASSCOMMAND, shell=True, stdin=subprocess.PIPE) proc.stdin.write('g.remove vect='+countyout… Re: subprocess calling Programming Software Development by glenwill101 … [Here](http://docs.python.org/library/subprocess.html#using-the-subprocess-module) i realized that to get subprocess() to execute "nano path…; i would have to supply arguments as alist eg. import subprocess path = "somefile.txt"… Subprocess stdout readline block Programming Software Development by tzushky … evaluating their communication. I start the server through a [B]subprocess.Popen[/B] giving its stdout to [B]PIPE[/B] [CODE…=Python] from subprocess import Popen,PIPE import os #Start subprocess cmd = 'myAppli arg1 arg2 arg3' p = Popen… subprocess.call problem Programming Software Development by sravan953 [CODE]import time import subprocess #TweetDeck a=15 print "Opening TweetDeck...\…; seconds remaining...") time.sleep(5) a-=5 subprocess.call("C:\Program Files\TweetDeck\TweetDeck.exe") … seconds remaining...") time.sleep(5) a-=5 subprocess.call("C:\Program Files\Mozilla Firefox\firefox.exe&… Re: subprocess module doubt? Programming Software Development by jlm699 Refer to [URL="http://docs.python.org/library/subprocess.html#subprocess.call"]documentation here[/URL]. The first argument contains your … init function. [URL="http://docs.python.org/library/subprocess.html#subprocess.Popen"]Refer here [/URL]to the remainder of items… Re: Subprocess Module Confusion Programming Software Development by harryhaaren … far as i remember (and its been a while!) using subprocess.Popen() makes a process object, and to actually communicate with… process, you use the "communicate" method. [code]processName = subprocess.Popen("ls -l" , shell=True etc etc) processName… Re: subprocess.Popen() question Programming Software Development by woooee …;Doug Hellmann's [URL=http://www.doughellmann.com/PyMOTW/subprocess/index.html#module-subprocess]Interacting with Another Command"[/URL] which is… Re: subprocess.call() within a for loop Programming Software Development by novice20 …the first element in the first list #--------do a subprocess call that sets the first element in the second list… #----within the second script do a subprocess call for the third script and so on #-------when…wise', but now it is happening 'column wise'. Does subprocess.call() spawn a process in the back ground?? I … subprocess.call() use output of the external program Programming Software Development by pythonbegin …. I called external script by using module subprocess. Now I want to use the output of the external … be great. what I am doing is this - [CODE] out = subprocess.call('Rscript script.R --args -arg1 arg2',shell=True) [/CODE… Re: Subprocess stdout readline block Programming Software Development by Gribouillis In fact the above solution doesn't work that well, because the program sometimes crashes when it tries to close the pipe while the thread is reading. I think that a possible solution would be to start a 2nd subprocess which would read the 1st subprocess' stdout and redirect it to a socket. One would then read into the socket in non blocking mode. Re: subprocess module doubt? Programming Software Development by zachabesh … = 'song.mp3' myList = ['myprog.exe',filename] subprocess.call(myList)[/CODE] Definetly look up the subprocess module, there's a whole lot more…