Debugger/DebuggerInterfaceRuby.py

changeset 3656
441956d8fce5
parent 3484
645c12de6b0c
child 3670
f0cb7579c0b4
equal deleted inserted replaced
3654:ffeb85cdc72d 3656:441956d8fce5
9 9
10 from __future__ import unicode_literals 10 from __future__ import unicode_literals
11 11
12 import os 12 import os
13 13
14 from PyQt4.QtCore import QObject, QTextCodec, QProcess, QTimer 14 from PyQt5.QtCore import QObject, QTextCodec, QProcess, QProcessEnvironment, \
15 QTimer
15 16
16 from E5Gui.E5Application import e5App 17 from E5Gui.E5Application import e5App
17 from E5Gui import E5MessageBox 18 from E5Gui import E5MessageBox
18 19
19 from . import DebugProtocol 20 from . import DebugProtocol
121 (dict of string) 122 (dict of string)
122 @return the process object (QProcess) or None 123 @return the process object (QProcess) or None
123 """ 124 """
124 proc = QProcess() 125 proc = QProcess()
125 if environment is not None: 126 if environment is not None:
126 env = [] 127 env = QProcessEnvironment()
127 for key, value in list(environment.items()): 128 for key, value in list(environment.items()):
128 env.append("{0}={1}".format(key, value)) 129 env.insert(key, value)
129 proc.setEnvironment(env) 130 proc.setProcessEnvironment(env)
130 args = [] 131 args = []
131 for arg in arguments: 132 for arg in arguments:
132 args.append(arg) 133 args.append(arg)
133 proc.start(program, args) 134 proc.start(program, args)
134 if not proc.waitForStarted(10000): 135 if not proc.waitForStarted(10000):

eric ide

mercurial