import module1
a = module1.ClassName()
import agentframework
point_1 = agentframework.Agent()
from agentframework import Agent
point_1 = Agent()
This just imports this one class.
from agentframework import *
import agentbasedmodellingframework as abm
agent_1 = abm.Agent()
from abm import AgentsRepresentingPeople as Ag
agent_1 = Ag()
import importlib
importlib.reload(modulename)
import module1
print(module1.module_variable)
module1.module_function()
a = module1.ClassName()
# module
print ("module loading") # Runs
def m1():
print ("method loading")
class cls:
print ("class loading") # Runs
def m2():
print("instance method loading")
c = A()
c.b()
class A:
def b (__self__) :
print ("hello world")
class A:
def b (__self__) :
print ("hello world")
c = A()
c.b()
does.
class A:
def __init__ (self):
self.b()
def b (self) :
print ("hello world")
-------------------------------
c = A()
if __name__ == "__main__":
# Imports needed for running.
function_name()
/abm
|
|
python -m packagename