Newbie OOP question
Ed
avoidspam at nospam.com
Mon Nov 17 20:44:55 EST 2003
I'm trying to create an OOP script but havn't quite figured out to do it.
Here's and example of what I'm trying to do.
1st file. DOG.py
class DOG:
def printName(self):
print "DOG"
2nd file: runDog.py
#!/usr/bin/python
import sys
from Commands import *
x = Commands()
a.printName()
when I run runDog.py ./runDOG.py it keeps coming up with an AttributeError:
class Commands has no attribute 'printName"
What am I doing wrong?
thanks!
Ed
When
More information about the Python-list
mailing list