Skip to content

Instantly share code, notes, and snippets.

@chapter09
Last active August 29, 2015 14:02
Show Gist options
  • Save chapter09/f165fab54bff18f1ae71 to your computer and use it in GitHub Desktop.
Save chapter09/f165fab54bff18f1ae71 to your computer and use it in GitHub Desktop.
Save Spark console log to file
import subprocess
with open("stdout.txt","wb") as out, open("stderr.txt","wb") as err:
subprocess.Popen("ls",stdout=out,stderr=err)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment