[Tutor] Importing sub modules
Emile van Sebille
emile at fenx.com
Thu Mar 31 22:17:08 CEST 2011
On 3/31/2011 11:07 AM Prasad, Ramit said...
> Hi everyone,
> I was wondering if there is a difference in
>>>> import os
>>>> import os.path
A quick test shows they're the same:
ActivePython 126.96.36.199 (ActiveState Software Inc.) based on
Python 2.6.6 (r266:84292, Aug 24 2010, 16:01:11) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os as os1
>>> import os.path
>>> os1.path is os.path
Although I'm not sure what to make of the joins What are you trying to do?
More information about the Tutor