I have a python module e.g. myModule in a subfolder and I have two files:
__init__.py:
from _auxiliary import *
_auxiliary.py:
myvar=False
def initialize():
global myvar
myvar=5
Now in ipython when I run:
>> import myModule
>> myModule.initialize()
the variable myModule.myvar is unchanged i.e. False
This does not happen if I put everything in __init__.py
Any idea on how to fix it?