eric6/DebugClients/Python/QProcessExtension.py

Thu, 13 Feb 2020 19:27:10 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 13 Feb 2020 19:27:10 +0100
branch
multi_processing
changeset 7411
6d8dcb3551b3
parent 7410
401791e6f50f
child 7412
0a995393d2ba
permissions
-rw-r--r--

Continued with the multiprocess debugger.

7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3 # Copyright (c) 2020 Detlev Offenbach <detlev@die-offenbachs.de>
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a function to patch QProcess to support debugging of the
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 process.
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9 """
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 import os
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
7409
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
13 _debugClient = None
7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15
7410
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
16 def _isPythonProgram(program, arguments):
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
17 """
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
18 Protected function to check, if program is a Python interpreter and
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
19 arguments don't include '-m'.
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
20
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
21 @param program program to be executed
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
22 @type str
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
23 @param arguments list of command line arguments
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
24 @type list of str
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
25 @return flag indicating a python program and a tuple containing the
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
26 interpreter to be used and the arguments
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
27 @rtype tuple of (bool, tuple of (str, list of str))
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
28 """
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
29 prog = program.lower()
7411
6d8dcb3551b3 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7410
diff changeset
30 ok = (
6d8dcb3551b3 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7410
diff changeset
31 ("python" in prog and arguments[0] != '-m') or
6d8dcb3551b3 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7410
diff changeset
32 "pypy" in prog
6d8dcb3551b3 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7410
diff changeset
33 )
7410
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
34 return ok, (program, arguments[:])
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
35
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
36
7409
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
37 def patchQProcess(module, debugClient):
7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 """
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 Function to patch the QtCore module's QProcess.
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 @param module reference to the imported module to be patched
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 @type module
7409
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
43 @param debugClient reference to the debug client object
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
44 @type DebugClient
7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 """ # __IGNORE_WARNING_D234__
7409
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
46 global _debugClient
7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 class QProcessWrapper(module.QProcess):
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 """
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 Wrapper class for *.QProcess.
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 """
7410
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
52 _origQProcessStartDetached = module.QProcess.startDetached
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
53
7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 def __init__(self, parent=None):
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 """
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 Constructor
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 """
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 super(QProcessWrapper, self).__init__(parent)
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59
7410
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
60 @classmethod
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
61 def modifyArgs(cls, arguments, multiprocessSupport):
7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 """
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 Private method to modify the arguments given to the start method.
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 @param arguments list of program arguments
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 @type list of str
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 @return modified argument list
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 @rtype list of str
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 """
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 (wd, host, port, exceptions, tracePython, redirect,
7409
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
71 noencoding) = _debugClient.startOptions[:7]
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
72
7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 modifiedArguments = [
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 os.path.join(os.path.dirname(__file__), "DebugClient.py"),
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 "-h", host,
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 "-p", str(port),
7409
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
77 "--no-passive",
7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 ]
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 if wd:
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 modifiedArguments.extend(["-w", wd])
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 if not exceptions:
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 modifiedArguments.append("-e")
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 if tracePython:
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 modifiedArguments.append("-t")
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 if not redirect:
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 modifiedArguments.append("-n")
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 if noencoding:
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 modifiedArguments.append("--no-encoding")
7409
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
90 if multiprocessSupport:
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
91 modifiedArguments.append("--multiprocess")
7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 modifiedArguments.append("--")
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 # end the arguments for DebugClient
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 modifiedArguments.extend(arguments)
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 return modifiedArguments
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97
7410
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
98 ###################################################################
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
99 ## Handling of 'start(...)' below
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
100 ###################################################################
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
101
7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 def start(self, *args, **kwargs):
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 """
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 Public method to start the process.
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 This method patches the arguments such, that a debug client is
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 started for the Python script. A Python script is assumed, if the
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 program to be started contains the string 'python'.
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 @param args arguments of the start call
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 @type list
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 @param kwargs keyword arguments of the start call
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 @type dict
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 """
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 if (
7409
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
116 _debugClient.debugging and
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
117 _debugClient.multiprocessSupport and
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
118 ((len(args) >= 2 and isinstance(args[1], list)) or
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
119 (len(args) == 1 and not isinstance(args[0], str)) or
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
120 len(args) == 0)
7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 ):
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 if len(args) >= 2:
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 program = args[0]
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 arguments = args[1]
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 if len(args) > 2:
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 mode = args[2]
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 else:
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 mode = module.QIODevice.ReadWrite
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 else:
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 program = self.program()
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 arguments = self.arguments()
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 if len(args) == 1:
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133 mode = args[0]
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 else:
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 mode = module.QIODevice.ReadWrite
7410
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
136 ok, (program, arguments) = _isPythonProgram(program, arguments)
7411
6d8dcb3551b3 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7410
diff changeset
137 if (
6d8dcb3551b3 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7410
diff changeset
138 ok and (
6d8dcb3551b3 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7410
diff changeset
139 not os.path.basename(arguments[0])
6d8dcb3551b3 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7410
diff changeset
140 in _debugClient.noDebugList
6d8dcb3551b3 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7410
diff changeset
141 )
6d8dcb3551b3 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7410
diff changeset
142 ):
7410
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
143 newArgs = self.modifyArgs(
7409
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
144 arguments, _debugClient.multiprocessSupport)
7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
145 super(QProcessWrapper, self).start(program, newArgs, mode)
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146 else:
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
147 super(QProcessWrapper, self).start(*args, **kwargs)
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
148 else:
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149 super(QProcessWrapper, self).start(*args, **kwargs)
7410
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
150
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
151 ###################################################################
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
152 ## Handling of 'startDetached(...)' below
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
153 ###################################################################
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
154
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
155 def startDetached(self, *args, **kwargs):
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
156 """
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
157 Public method to start the detached process.
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
158
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
159 This method patches the arguments such, that a debug client is
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
160 started for the Python script. A Python script is assumed, if the
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
161 program to be started contains the string 'python'.
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
162
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
163 @param args arguments of the start call
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
164 @type list
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
165 @param kwargs keyword arguments of the start call
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
166 @type dict
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
167 @return flag indicating a successful start
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
168 @rtype bool
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
169 """
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
170 if isinstance(self, str):
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
171 return QProcessWrapper.startDetachedStatic(
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
172 self, *args)
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
173 else:
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
174 return self.__startDetached(*args, **kwargs)
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
175
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
176 def __startDetached(self, *args, **kwargs):
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
177 """
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
178 Private method to start the detached process.
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
179
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
180 This method patches the arguments such, that a debug client is
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
181 started for the Python script. A Python script is assumed, if the
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
182 program to be started contains the string 'python'.
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
183
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
184 @param args arguments of the start call
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
185 @type list
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
186 @param kwargs keyword arguments of the start call
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
187 @type dict
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
188 @return flag indicating a successful start
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
189 @rtype bool
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
190 """
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
191 if (
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
192 _debugClient.debugging and
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
193 _debugClient.multiprocessSupport and
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
194 len(args) == 0
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
195 ):
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
196 program = self.program()
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
197 arguments = self.arguments()
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
198 wd = self.workingDirectory()
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
199
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
200 ok, (program, arguments) = _isPythonProgram(program, arguments)
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
201 if ok:
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
202 return QProcessWrapper.startDetachedStatic(
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
203 program, arguments, wd)
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
204 else:
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
205 return super(QProcessWrapper, self).startDetached(
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
206 *args, **kwargs)
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
207 else:
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
208 return super(QProcessWrapper, self).startDetached(
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
209 *args, **kwargs)
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
210
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
211 @staticmethod
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
212 def startDetachedStatic(*args, **kwargs):
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
213 """
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
214 Static method to start the detached process.
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
215
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
216 This method patches the arguments such, that a debug client is
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
217 started for the Python script. A Python script is assumed, if the
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
218 program to be started contains the string 'python'.
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
219
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
220 @param args arguments of the start call
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
221 @type list
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
222 @param kwargs keyword arguments of the start call
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
223 @type dict
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
224 @return flag indicating a successful start
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
225 @rtype bool
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
226 """
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
227 if (
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
228 _debugClient.debugging and
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
229 _debugClient.multiprocessSupport and
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
230 (len(args) >= 2 and isinstance(args[1], list))
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
231 ):
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
232 program = args[0]
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
233 arguments = args[1]
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
234 if len(args) >= 3:
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
235 wd = args[2]
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
236 else:
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
237 wd = ""
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
238 ok, (program, arguments) = _isPythonProgram(program, arguments)
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
239 if ok:
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
240 newArgs = QProcessWrapper.modifyArgs(
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
241 arguments, _debugClient.multiprocessSupport)
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
242 return QProcessWrapper._origQProcessStartDetached(
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
243 program, newArgs, wd)
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
244 else:
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
245 return QProcessWrapper._origQProcessStartDetached(
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
246 *args, **kwargs)
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
247 else:
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
248 return QProcessWrapper._origQProcessStartDetached(
401791e6f50f Continued with the multiprocess debugger. Implemented QProcess.startDetached() wrapper.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7409
diff changeset
249 *args, **kwargs)
7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
250
7409
1413bfe73d41 Continued with the multiprocess debugger.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7407
diff changeset
251 _debugClient = debugClient
7407
a0b6acee2c20 Continued with the multiprocess debugger. Started with QProcess support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
252 module.QProcess = QProcessWrapper

eric ide

mercurial