Python subprocess.call STDOUT failing -


i have following python code, no matter combination of options use not log file - keeps logging terminal... log file empty nothing in. going wrong?

i've tried number of subprocess functions passing different parameters without luck.

import subprocess  logfile = open("runlog.txt", "w");  subprocess.call("rm -rf /opt/playlistscraper/downloaded/*.json", stdout=logfile, shell=true); subprocess.call("scrapy crawl radio1 -o/opt/playlistscraper/downloaded/radio1.json", stdout=logfile, shell=true); 


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -