Changeset 358 for WingDBG/trunk/WingDBG.py
- Timestamp:
- 07/31/07 10:09:19 (5 years ago)
- Files:
-
- 1 modified
-
WingDBG/trunk/WingDBG.py (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
WingDBG/trunk/WingDBG.py
r152 r358 27 27 __doc__ = """Wing Debugger Service Module""" 28 28 29 __version__ = ' 2.1.0'29 __version__ = '3.0.0' 30 30 31 31 … … 68 68 69 69 self.reason = reason 70 sys.stderr.write(reason + '\n') 70 71 71 72 class IDEConnectionTimeOut(Exception): … … 165 166 def __init__(self): 166 167 if sys.platform == 'win32': 167 self.wing_home = r'c:\Program Files\Wing IDE 2.1'168 self.wing_home = r'c:\Program Files\Wing IDE 3.0' 168 169 elif sys.platform.startswith('darwin'): 169 170 self.wing_home = '/Applications/WingIDE.app/Contents/MacOS' 170 171 else: 171 self.wing_home = '/usr/lib/wingide 2.1'172 self.wing_home = '/usr/lib/wingide3.0' 172 173 173 174 winghome_file = os.path.join(PRODUCT_DIR, '.winghome') … … 234 235 security.declareProtected(VIEW_PERMISSION, 'wingDebugPwIsValid') 235 236 def wingDebugPwIsValid(self): 236 """Return true if .wingdebugpw can be found"""237 """Return true if wingdebugpw can be found""" 237 238 dir = self.getProfileDir() 238 return dir and os.path.isfile(os.path.join(dir, ' .wingdebugpw'))239 return dir and os.path.isfile(os.path.join(dir, 'wingdebugpw')) 239 240 240 241 # … … 316 317 gHttpServer.RunOnDebugThread(cb) 317 318 318 # Wait up to 3 secondsfor connection319 # Wait up for connection 319 320 start_time = time.time() 320 321 while time.time() < start_time + 5 and not status['completed']: … … 335 336 raise CannotStartDebugger('Cannot find wingdb.py in $(WINGHOME)/src or' 336 337 ' $(WINGHOME)/bin') 337 338 339 try: 340 exec_dict = {} 341 execfile(os.path.join(winghome, 'bin', '_patchsupport.py'), exec_dict) 342 find_matching = exec_dict['FindMatching'] 343 dir_list = find_matching('bin', internal_home, user_settings=None) 344 except Exception: 345 dir_list = [] 346 347 dir_list.extend([os.path.join(internal_home, 'bin'), 348 os.path.join(internal_home, 'src')]) 338 349 wingdb = None 339 for path in [os.path.join(internal_home, 'bin'), 340 os.path.join(internal_home, 'src')]: 350 for path in dir_list: 341 351 try: 342 352 f, p, d = imp.find_module('wingdb', [path]) … … 371 381 tracer.set_always_stop_excepts(()) 372 382 tracer.set_never_stop_excepts(()) 383 384 # Stop tracing 385 tracer.stop_trace() 386 373 387 # Unload modules 374 388 for name in ('wingdb', 'netserver'): … … 434 448 ' Advanced Settings page.') 435 449 if pw_path: # Always either empty or length 1 436 pathname = os.path.join(pw_path[0], ' .wingdebugpw')450 pathname = os.path.join(pw_path[0], 'wingdebugpw') 437 451 if not os.access(pathname, os.R_OK): 438 452 msg = ('Cannot create debugger because "%s"' 439 453 ' cannot be read.\nPlease make sure the user %s' 440 454 ' can read the file or change the directory that' 441 ' .wingdebugpw is read from via the Connection'455 ' wingdebugpw is read from via the Connection' 442 456 ' Security options in the Advanced Settings page.' 443 457 % (pathname, getUsername(gNetServer) or '<unknown>')) … … 669 683 def getDisplayValue(self, field, value): 670 684 if field == 'pw_mode': 671 return ('From $WINGHOME', 'From custom directory',685 return ('From User Settings Directory', 'From custom directory', 672 686 'Custom password and scrambling mode')[value] 673 687 if field == 'custom_encrypt_type':
