Reputation: 1082
I'm having trouble with a Python package on PyPi. I can't see any answered questions for problems like this (though I've found some unanswered ones), so here goes:
My package BrickPython looks like this:
BrickPython
+ BrickPython
+ __init__.py
+ Scheduler.py
+ Other test and example modules at top level.
The module has a working setup.py; package BrickPython appears to be correctly installed on PyPi (using python setup.py sdist upload); and
sudo pip install BrickPython
completes successfully. However when I attempt to use it, I see errors:
>>> import BrickPython
>>> BrickPython.Motor
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Motor'
As far as I can see I'm following the setup similar to http://guide.python-distribute.org/creation.html#directory-layout (for all the test code is in a different place), so I'm wondering what can be wrong. It's painful to experiment with this, as apparently I have to make a new release to test each change I make.
Please,
1) How can I experiment with egg package installation without going through PyPi installations?
2) What should I do to make it work?
Upvotes: 0
Views: 66
Reputation: 1692
Give this a try
from BrickPython import Motor
m = Motor.Motor(<port>, [scheduler])
Upvotes: 0