Hello World-ish
Jesse Lands
jglands at bellsouth.net
Sat Nov 26 02:28:45 EST 2005
On 26 Nov 2005 03:19:55 -0800
"ludvig.ericson at gmail.com" <ludvig.ericson at gmail.com> wrote:
> 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?
>
your using the getcwd from os. You need to change the 'from os import
*' to import os
i.e.
import os
print "Working path: %s" % os.getcwd()
--
JLands
Slackware 9.1
Registered Linux User #290053
"If you were plowing a field, which would you rather use? Two strong
oxen or 1024 chickens?"
- Seymour Cray (1925-1996), father of supercomputing
More information about the Python-list
mailing list