python - Pyinstaller issue with subprocess.check_output on onefile executable under windows -


there requirement of running subprocess.check_output catch ouptupt of 7zip in application. simple code using

output = subprocess.check_output(["path/to/7zip", "l", "path/to/archieve"], shell=true) print output 

as expected works when run ide. same goes crazy , not working after compiled in onefile executable using pyinstaller. other subprocess command subprocess.call works after converting script in executable. how use subprocess.check_output in executable?

i use following:-

windows 7
python 2.7.5
pyqt4
pyinstaller 2.1

any appreciated.

ok. got solved self. used os.popen command accomplish same task. sake of completeness, posting solution code below:-

out = os.popen("path/to/7zip l path/to/archieve").read()   print out 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -