G
Gabriel Rossetti
Hello everyone,
I'd like to ba able to import a package and have it's __init__
conditionally import a subpackage. Suppose that you have this structure :
mybase/
mybase/__init__.py
mybase/mypkg
mybase/mypkg/__init__.py
mybase/mypkg/module0.py
mybase/mypkg/type1
mybase/mypkg/type1/__init__.py
mybase/mypkg/type1/module1.py
mybase/mypkg/type1/module2.py
mybase/mypkg/type2
mybase/ mypkg/type2/__init__.py
mybase/ mypkg/type2/module1.py
mybase/ mypkg/type2/module2.py
I'd like to do something like th following in my code
'mybase/mypkg/type1/module2.pyc'
but I can't figure out how to do this.
Thank you,
Gabriel
I'd like to ba able to import a package and have it's __init__
conditionally import a subpackage. Suppose that you have this structure :
mybase/
mybase/__init__.py
mybase/mypkg
mybase/mypkg/__init__.py
mybase/mypkg/module0.py
mybase/mypkg/type1
mybase/mypkg/type1/__init__.py
mybase/mypkg/type1/module1.py
mybase/mypkg/type1/module2.py
mybase/mypkg/type2
mybase/ mypkg/type2/__init__.py
mybase/ mypkg/type2/module1.py
mybase/ mypkg/type2/module2.py
I'd like to do something like th following in my code
'mybase/mypkg/type1/module2.pyc'
but I can't figure out how to do this.
Thank you,
Gabriel