eric6/DebugClients/Python/SubprocessExtension.py

branch
multi_processing
changeset 7875
12c621ed4377
parent 7873
cb2badbdf26c
child 7901
6ff7ccf0cb50
equal deleted inserted replaced
7874:8dcb77600690 7875:12c621ed4377
9 """ 9 """
10 10
11 import os 11 import os
12 import shlex 12 import shlex
13 13
14 from DebugUtilities import isPythonProgram, startsWithShebang, patchArguments 14 from DebugUtilities import isPythonProgram, patchArguments
15 15
16 _debugClient = None 16 _debugClient = None
17 17
18 18
19 def patchSubprocess(module, debugClient): 19 def patchSubprocess(module, debugClient):
55 else: 55 else:
56 # create a copy of the arguments 56 # create a copy of the arguments
57 arguments = arguments[:] 57 arguments = arguments[:]
58 ok = isPythonProgram(arguments[0]) 58 ok = isPythonProgram(arguments[0])
59 if ok: 59 if ok:
60 if startsWithShebang(arguments[0]): 60 scriptName = os.path.basename(arguments[0])
61 scriptName = os.path.basename(arguments[0])
62 else:
63 # TODO: this seems to be weird
64 scriptName = os.path.basename(arguments[0])
65 if scriptName not in _debugClient.noDebugList: 61 if scriptName not in _debugClient.noDebugList:
66 arguments = patchArguments( 62 arguments = patchArguments(
67 _debugClient, arguments, noRedirect=True 63 _debugClient, arguments, noRedirect=True
68 ) 64 )
69 65

eric ide

mercurial