gbiggs / rtshell

Shell commands for managing RT-Middleware running on OpenRTM-aist.
http://openrtm.org
GNU Lesser General Public License v3.0
10 stars 17 forks source link

fix problem on importing submodule #8

Closed yocchi closed 10 years ago

yocchi commented 13 years ago

problem: rtprint cannot import submodule like A.B. $ rtprint -m A.B rtc:port rtprint: No module named A.B

solution: use __import__ instead of imp.find_module & imp.load_module. "__POA" module importing is also fixed.

gbiggs commented 10 years ago

Importing of sub-modules is fixed.

The provided solution for the POAs was not a fix. the POA module is not guaranteed to be the top-level module (just as it is not guaranteed to be the bottom-level module). Until a better solution that actively searches for the POA module is implemented, I recommend that you specify both the top-level module and the complete module path to be loaded on the command line. The command will fail to load the POA module for one of them, but it will still load all the rest correctly.