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
Post a Comment