I have 2 files: file1 and file2 in the same directory:
Contents of file1:
class Class1:
class_variable = widgets.interactive_output(Class1.static_method, {'index' : index})
@staticmethod
def static_method(index):
//body of the function
Contents of file2:
from file1 import Class1
When i run file2, I get following errors based on calls:
When I call it using:
1. Class1.static_method, {'index' : index})
I get the error:
NameError: name 'Class1' is not defined
2. static_method, {'index' : index})
I get the error:
NameError: name 'static_method' is not defined
How can I solve this? Any help is appreciated..