do 'os.path' include 'os' for us?

2008-03-27 Thread Jerry Fleming
Hi, I wrote a python script to list files in a directory but somehow did it wrongly by importing os.path instead of os. To my astonishment, it works just as charm: #!/usr/bin/python import os.path for file in os.listdir('/root/'): print file I was wondering why? os.path doesn't contain

Re: do 'os.path' include 'os' for us?

2008-03-27 Thread John Machin
On Mar 27, 6:41 pm, Jerry Fleming [EMAIL PROTECTED] wrote: Hi, I wrote a python script to list files in a directory but somehow did it wrongly by importing os.path instead of os. To my astonishment, it works just as charm: #!/usr/bin/python import os.path for file in os.listdir('/root/'):