DebugClients/Python3/DebugClientBase.py

changeset 42
23b45a742e17
parent 33
597036b70646
child 43
2fdc635b106a
equal deleted inserted replaced
41:572a009369f0 42:23b45a742e17
203 # commandline completion stuff 203 # commandline completion stuff
204 self.complete = Completer(self.debugMod.__dict__).complete 204 self.complete = Completer(self.debugMod.__dict__).complete
205 205
206 self.compile_command = codeop.CommandCompiler() 206 self.compile_command = codeop.CommandCompiler()
207 207
208 self.coding_re = re.compile(r"coding[:=]\s*([-\w_.]+)") 208 self.coding_re = re.compile(br"coding[:=]\s*([-\w_.]+)")
209 self.defaultCoding = 'utf-8' 209 self.defaultCoding = 'utf-8'
210 self.__coding = self.defaultCoding 210 self.__coding = self.defaultCoding
211 self.noencoding = False 211 self.noencoding = False
212 212
213 def getCoding(self): 213 def getCoding(self):
239 return 239 return
240 240
241 for l in text.splitlines(): 241 for l in text.splitlines():
242 m = self.coding_re.search(l) 242 m = self.coding_re.search(l)
243 if m: 243 if m:
244 self.__coding = m.group(1) 244 self.__coding = m.group(1).decode()
245 return 245 return
246 self.__coding = default 246 self.__coding = default
247 247
248 def attachThread(self, target = None, args = None, kwargs = None, mainThread = False): 248 def attachThread(self, target = None, args = None, kwargs = None, mainThread = False):
249 """ 249 """

eric ide

mercurial