File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,19 +208,22 @@ def run_action():
208208 # .. TODO: more than one script as argument ? ..
209209 program = args .program
210210 if program [0 ].endswith ('.py' ) and not args .nopython :
211- if not program [0 ].startswith ("python" ):
212- program .insert (0 , sys .executable )
213211 if args .multiprocess :
214212 # in multiprocessing mode you want to spawn a separate
215213 # python process
214+ if not program [0 ].startswith ("python" ):
215+ program .insert (0 , sys .executable )
216216 args .python = False
217+ else :
218+ args .python = True
217219 if args .python :
218220 print ("running as a Python program..." )
219221 if not program [0 ].startswith ("python" ):
220222 program .insert (0 , sys .executable )
221223 cmd_line = get_cmd_line (program )
222224 program [1 :1 ] = ("-m" , "memory_profiler" , "--timestamp" ,
223225 "-o" , mprofile_output )
226+ print (program )
224227 p = subprocess .Popen (program )
225228 else :
226229 cmd_line = get_cmd_line (program )
You can’t perform that action at this time.
0 commit comments