77 if len(args) == 1: |
77 if len(args) == 1: |
78 mode = args[0] |
78 mode = args[0] |
79 else: |
79 else: |
80 mode = module.QIODevice.ReadWrite |
80 mode = module.QIODevice.ReadWrite |
81 ok = isPythonProgram(program) |
81 ok = isPythonProgram(program) |
82 if ( |
82 if ok: |
83 ok and ( |
83 if startsWithShebang(program): |
84 not os.path.basename(arguments[0]) |
84 scriptName = os.path.basename(program) |
85 in _debugClient.noDebugList |
85 else: |
86 ) |
86 scriptName = os.path.basename(arguments[0]) |
87 ): |
87 if scriptName not in _debugClient.noDebugList: |
88 newArgs = patchArguments( |
88 newArgs = patchArguments( |
89 _debugClient, |
89 _debugClient, |
90 [program] + arguments, |
90 [program] + arguments, |
91 ) |
91 ) |
92 super(QProcessWrapper, self).start( |
92 super(QProcessWrapper, self).start( |
93 newArgs[0], newArgs[1:], mode) |
93 newArgs[0], newArgs[1:], mode) |
94 return |
94 return |
95 |
95 |
96 super(QProcessWrapper, self).start(*args, **kwargs) |
96 super(QProcessWrapper, self).start(*args, **kwargs) |
97 |
97 |
98 ################################################################### |
98 ################################################################### |
99 ## Handling of 'startDetached(...)' below |
99 ## Handling of 'startDetached(...)' below |
178 wd = args[2] |
178 wd = args[2] |
179 else: |
179 else: |
180 wd = "" |
180 wd = "" |
181 ok = isPythonProgram(program) |
181 ok = isPythonProgram(program) |
182 if ok: |
182 if ok: |
183 newArgs = patchArguments( |
183 if startsWithShebang(program): |
184 _debugClient, |
184 scriptName = os.path.basename(program) |
185 [program] + arguments, |
185 else: |
186 ) |
186 scriptName = os.path.basename(arguments[0]) |
187 return QProcessWrapper._origQProcessStartDetached( |
187 if scriptName not in _debugClient.noDebugList: |
188 newArgs[0], newArgs[1:], wd) |
188 newArgs = patchArguments( |
|
189 _debugClient, |
|
190 [program] + arguments, |
|
191 ) |
|
192 return QProcessWrapper._origQProcessStartDetached( |
|
193 newArgs[0], newArgs[1:], wd) |
189 |
194 |
190 return QProcessWrapper._origQProcessStartDetached( |
195 return QProcessWrapper._origQProcessStartDetached( |
191 *args, **kwargs) |
196 *args, **kwargs) |
192 |
197 |
193 _debugClient = debugClient |
198 _debugClient = debugClient |