mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
* profile.py, pdb.py: added help() function
* builtin.py: b/w compat for builtin -> __builtin__ name change * string.py: added atof() and atol() and corresponding exceptions * test_types.py: added test for list sort with user comparison function
This commit is contained in:
parent
3bb8a05947
commit
e61fa0a1e4
5 changed files with 93 additions and 2 deletions
|
@ -377,3 +377,15 @@ def debug():
|
|||
# test command
|
||||
def test():
|
||||
run('import x; x.main()')
|
||||
|
||||
# print help
|
||||
def help():
|
||||
for dirname in sys.path:
|
||||
fullname = os.path.join(dirname, 'profile.doc')
|
||||
if os.path.exists(fullname):
|
||||
sts = os.system('${PAGER-more} '+fullname)
|
||||
if sts: print '*** Pager exit status:', sts
|
||||
break
|
||||
else:
|
||||
print 'Sorry, can\'t find the help file "profile.doc"',
|
||||
print 'along the Python search path'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue