I had a class in as below in module practice. practice/example.py
class Example :
#some code#
e1= Example();
e2= Example();
and I had practice/__init__.py
from example import Example
and i had main.py
import sys , python_practice
e3 = python_practice.Example();
from python_practice import *
e1.sum(1,2);
but i am getting error as
Traceback (most recent call last):
File "practice.py", line 11, in <module>
e1.sum(1,2);
NameError: name 'e1' is not defined
Where I went wrong....
Is it possible to import the object of the class to another module ?