I have a python program and I'm trying to import other python classes and I am getting a NameError:
Traceback (most recent call last):
File "run.py", line 3, in <module>
f = wow('fgd')
NameError: name 'wow' is not defined
This is in file called new.py
:
class wow(object):
def __init__(self, start):
self.start = start
def go(self):
print "test test test"
f = raw_input("> ")
if f == "test":
print "!!"
return c.vov()
else:
print "nope"
return f.go()
class joj(object):
def __init__(self, start):
self.start = start
def vov(self):
print " !!!!! "
This is in file run.py
:
from new import *
f = wow('fgd')
c = joj('fds')
f.go()
What am I doing wrong?