[EMAIL PROTECTED] wrote:
> If you use 'from os import *' then you shouldn't preface the commands
> with os.
> 
> So, two options:
> 
> from os import *
> print "Working Path: %s" % getcwd()
> 
> OR
> 
> import os
> print "Working Path: %s" % os.getcwd()
> 
> One of these two ways you're not supposed to use for security reasons,
> but I'm spacing on which one.

I don't think there are any *security* reasons, but stylistically,
"import os" is greatly preferred. When someone else reads your code,
they will immediately know where getcwd() comes from.

-- 
Robert Kern
[EMAIL PROTECTED]

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to