Prasad, Ramit wrote:
The joins are really just random calls. I was just curious if importing os.path
could avoid any reading/overhead that might occur by importing os.
No.
Python has no way of knowing what os.path is until it has imported os
and can do an attribute lookup on os.path. This is determined at runtime
by the os module, and depends on your operating system:
>>> import os.path
>>> os
<module 'os' from '/usr/lib/python2.4/os.pyc'>
>>> os.path
<module 'posixpath' from '/usr/lib/python2.4/posixpath.pyc'>
DO NOT try importing posixpath (or equivalent for other OSes) directly,
always use os.path.
--
Steven
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor