I'm trying to import multiple library files under a single alias, without the use of the init.py file (because it's apparently not supported by ROS).
Example:
Let's say we have the following files:
foo/
__init__.py # This file is empty, used to categorize foo as a package.
a.py
b.py
c.py
bar/
example.py
a, b and c all include different functions which I need in example, so I import them
#example.py
from foo import a, b, c
a.fn1()
b.fn2()
c.fn3()
This works, but is there some way I could group them all under a single alias? Like so:
#example.py
from foo import [a, b, c] as foo
foo.fn1()
foo.fn2()
foo.fn3()
Again, I know this can be done by importing them under the init.py, but since our library is meant to work under ROS, we are currently unable to do as such without ending up with import errors when running in it ROS.
Thanks in advance.