there is no exitfunc in sys module

Hameed Khan hameedkhaan at yahoo.com
Sat Jan 24 03:07:53 EST 2004


hi,
 i was reading the manual for sys module. i found a
description for a function known as exitfunc. and it
says the function installed by
sys.exitfunc(cleanUpFunc) call will be called when the
interpreter exits. but when i try to call this
function on Python interactive prompt it says there is
no attribute named exitfunc in sys module.

###
>>> sys.exitfunc
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute
'exitfunc'
>>> dir(sys)
['__displayhook__', '__doc__', '__excepthook__',
'__name__', '__stderr__', '__stdin__', '__stdout_
_', '_getframe', 'api_version', 'argv',
'builtin_module_names', 'byteorder', 'call_tracing',
'call
stats', 'copyright', 'displayhook', 'dllhandle',
'exc_clear', 'exc_info', 'exc_type', 'excepthook'
, 'exec_prefix', 'executable', 'exit',
'getcheckinterval', 'getdefaultencoding',
'getfilesystemenc
oding', 'getrecursionlimit', 'getrefcount',
'getwindowsversion', 'hexversion', 'last_traceback', '
last_type', 'last_value', 'maxint', 'maxunicode',
'meta_path', 'modules', 'path', 'path_hooks', 'p
ath_importer_cache', 'platform', 'prefix', 'ps1',
'ps2', 'setcheckinterval', 'setprofile', 'setrec
ursionlimit', 'settrace', 'stderr', 'stdin', 'stdout',
'version', 'version_info', 'warnoptions', '
winver']
###

i am wondering that only i dont have this in my sys
module or it is being deleted from sys module. and if
only i dont have this function what reason it could be
that i dont have this function.

### Version information
>>> sys.version
'2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit
(Intel)]'

Thanks,
Hameed Khan

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/




More information about the Python-list mailing list