"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:

> from os import *
> print "Working path: %s" % os.getcwd();
> 
> Just wondering how you would do that .. in theory, if you get what I
> mean?
> I get
> NameError: name 'os' is not defined
> currently, which I don't know how to fix.. anyone?

Either:

import os

or

print "Working path: %s" % getcwd();



Avoid "from <module> import *" always when you can (there are still modules
designed to work with it).  It pollutes namespace and might lead to
undesirable clobbing of data structures (is it your 'getId' method or the
module's that is being used? ;-)).



Be seeing you,
-- 
Jorge Godoy      <[EMAIL PROTECTED]>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to