Created
April 3, 2013 15:21
-
-
Save gabraganca/5302166 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from subprocess import Popen, PIPE | |
def run_idl(inp, do_log = False): | |
"""Run IDL""" | |
if do_log: | |
with open('idl.log', 'w') as log: | |
idl = Popen(['nice','-n0','idl'],stdin = PIPE, \ | |
stdout=log,stderr=log) | |
idl.communicate(inp) | |
else: | |
print '########### IDL ##################' | |
idl = Popen(['nice','-n0','idl'],stdin = PIPE) | |
idl.communicate(inp) | |
print '######## Quitting IDL ############' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment