Using Python Subprocess to send command lines to command prompt [Error 2: The system cannot find the file specified] -


i'm trying send command line command prompt (terminal) , read output keep receiving error:

self get_version(self)  file <folder path of script>, line 39, in get_version stdout = subprocess.pipe file "c:\python27\lib\subprocess.py", line 710, in __init__ errread, errwrite) file "c:\python27\lib\subprocess.py", line 958, in _execute_child startupinfo) windowserror: [error 2] system cannot find file specified 

here's code:

import subprocess  def get_version(self)     command = "wmic datafile name='c:\\drivers\\current_version\\genericdriversetup.exe' version"     proc = subprocess.popen([command],      stdout=subprocess.pipe)      stdout_value = proc.communicate()[0]     print '\tstdout:', repr(stdout_value) 

can tell me what's wrong this? much


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -