diff msconvert_raw_wrapper.py @ 8:d2c61663e33c draft

Uploaded
author galaxyp
date Fri, 26 Sep 2014 14:44:54 -0400
parents 10f4a0356342
children
line wrap: on
line diff
--- a/msconvert_raw_wrapper.py	Mon Feb 17 17:00:29 2014 -0500
+++ b/msconvert_raw_wrapper.py	Fri Sep 26 14:44:54 2014 -0400
@@ -3,7 +3,7 @@
 import os
 import sys
 import tempfile
-import shutil 
+import shutil
 import subprocess
 import re
 from os.path import basename
@@ -33,14 +33,14 @@
             except OverflowError:
                 pass
     return stderr
-    
+
 def execute(command, stdin=None):
     with open(tmp_stderr_name, 'wb') as tmp_stderr:
         with open(tmp_stdout_name, 'wb') as tmp_stdout:
             proc = subprocess.Popen(args=command, shell=True, stderr=tmp_stderr.fileno(), stdout=tmp_stdout.fileno(), stdin=stdin, env=os.environ)
             returncode = proc.wait()
             if returncode != 0:
-                raise Exception, "Program returned with non-zero exit code %d. stderr: %s" % (returncode, read_stderr())
+                raise Exception("Program returned with non-zero exit code %d. stderr: %s" % (returncode, read_stderr()))
 
 def delete_file(path):
     if os.path.exists(path):
@@ -114,7 +114,7 @@
     cmd = "%s --inten%s" % (cmd, options.intensityencoding)
     cmd = "%s %s" % (cmd, input_file)
     cmd = "%s %s" % (cmd, filter_commands)
-    print cmd
+    print(cmd)
     execute(cmd)
     output_files = os.listdir('output')
     assert len(output_files) == 1