I would like to do the following:
import mymodule
m = mymodule.MyModule()
m.dosth()
# Does something
m.more.domore()
# Does more
The mymodule __init__.py file looks like this:
class MyModule():
def __init__(self):
pass # Constructor
def dosth(self):
print("My module is doing something!")
class more:
def domore(self):
print("My module is doing even more!")
But when I run my script, a TypeError occurres:
TypeError: domore() missing 1 required positional argument: 'self. How can I call methods from the class more without getting errors?