D
Dale Amon
I am going around in circles right now and have to
admit I do not understand what is going on with
import of hierarchical packages/modules. Perhaps someone
can get me on the road again. Here is a subset of what I
am trying to accomplish:
The package directory set up:
VLMLegacy/
__init__.py
Reader.py
Conditions.py
VLM4997/
__init__.py
Conditions.py
WINGTL/
__init__.py
Conditions.py
The inheritance:
object
Reader
Conditions
VLM4997.Conditions
WINGTL.Conditions
Now how do I use import or from to be able to
use these modules? The following is not 'real'
code and is only intended to give some idea of
what I am trying to accomplish:
import sys
sys.path.extend (['../lib', '../bin'])
import VLMLegacy.VLM4997.Conditions
import VLMLegacy.WINGTL.Conditions
b = VLM4997.Conditions(2)
b.test()
c = WINGTL.Conditions(2)
c.test()
And of course note that both of those must inherit
VLMLegacy.Conditions().
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iD8DBQFJ+JPhZHES7UL0zXERAhvoAJ4vFinsMeupaQMRx/YiNoWyHzvt+ACbB2rv
DkwvXk9s2XZMMb2ESZ8uJvc=
=m8Jw
-----END PGP SIGNATURE-----
admit I do not understand what is going on with
import of hierarchical packages/modules. Perhaps someone
can get me on the road again. Here is a subset of what I
am trying to accomplish:
The package directory set up:
VLMLegacy/
__init__.py
Reader.py
Conditions.py
VLM4997/
__init__.py
Conditions.py
WINGTL/
__init__.py
Conditions.py
The inheritance:
object
Reader
Conditions
VLM4997.Conditions
WINGTL.Conditions
Now how do I use import or from to be able to
use these modules? The following is not 'real'
code and is only intended to give some idea of
what I am trying to accomplish:
import sys
sys.path.extend (['../lib', '../bin'])
import VLMLegacy.VLM4997.Conditions
import VLMLegacy.WINGTL.Conditions
b = VLM4997.Conditions(2)
b.test()
c = WINGTL.Conditions(2)
c.test()
And of course note that both of those must inherit
VLMLegacy.Conditions().
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iD8DBQFJ+JPhZHES7UL0zXERAhvoAJ4vFinsMeupaQMRx/YiNoWyHzvt+ACbB2rv
DkwvXk9s2XZMMb2ESZ8uJvc=
=m8Jw
-----END PGP SIGNATURE-----