I have 2 classes. The first is named test and goes as following:
import textbox
class test:
a=textbox("test")
a.run()
the second class is textbox and goes as following:
class textbox():
def __init__(self, string):
self.string=string
def run(self):
print string
i get this error
File "C:\Users\User\Desktop\edoras\gui\test.py", line 4, in test
a=textbox("test")
TypeError: 'module' object is not callable
I use the pydev eclipse plugin
Try
a = textbox.textbox("test")
or alternatively use
from textbox import textbox
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With