I have a file named client_simulator.py and it contains a Class named Client_simulator which simulates clients behavior.
I have another file named pool_manager.py and it has no class, it has one __main__ and lot of functions and basically, I want to call a method named generator of Client_simulator class from one of the methods of pool_manager.py.
the basic structure of client_simulator.py is as follows
class Client_simulator(object):
def generator(self):
if __name__ == '__main__':
Client_simulator().generator()
the basic structure of file pool manager.py is as follows
def start_client_simulator():
client_simulator.Client_simulator().generator()
if __name__ == "__main__":
start_client_simulator()
I am getting the following error
'module' object is not callable
P.S: I want to call __main __ instead of `generator()', how to do that?
I am recently moving from java to python that's why having these basic doubts. Thanks in advance
