##// END OF EJS Templates
Minor cleanup in oinspect.
Thomas Kluyver -
Show More
@@ -357,7 +357,7 b' class Inspector:'
357 # where the object is defined
357 # where the object is defined
358 ofile = inspect.getabsfile(obj)
358 ofile = inspect.getabsfile(obj)
359
359
360 if (ofile.endswith('.so') or ofile.endswith('.dll')):
360 if ofile.endswith(('.so', '.dll', '.pyd')):
361 print 'File %r is binary, not printing.' % ofile
361 print 'File %r is binary, not printing.' % ofile
362 elif not os.path.isfile(ofile):
362 elif not os.path.isfile(ofile):
363 print 'File %r does not exist, not printing.' % ofile
363 print 'File %r does not exist, not printing.' % ofile
@@ -549,7 +549,7 b' class Inspector:'
549 fname = inspect.getabsfile(obj.__class__)
549 fname = inspect.getabsfile(obj.__class__)
550 if fname.endswith('<string>'):
550 if fname.endswith('<string>'):
551 fname = 'Dynamically generated function. No source code available.'
551 fname = 'Dynamically generated function. No source code available.'
552 if any(fname.endswith(e) for e in ['.so', '.dll', '.pyd']):
552 if fname.endswith(('.so', '.dll', '.pyd')):
553 binary_file = True
553 binary_file = True
554 out['file'] = fname
554 out['file'] = fname
555 except:
555 except:
General Comments 0
You need to be logged in to leave comments. Login now