E
Ed
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
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