Ok I found the problem, it was an environmental issue, I had the same modules (minus options.py) on the sys.path and it was importing from there instead. Thanks everyone for your help.
I have a series of import statements, the last of which will not work. Any idea why? options.py is sitting in the same directory as everything else.
from snipplets.main import MainHandler
from snipplets.createnew import CreateNewHandler
from snipplets.db import DbSnipplet
from snipplets.highlight import HighLighter
from snipplets.options import Options
ImportError: No module named options
my __init__.py file in the snipplets directory is blank.
I suspect that one of your other imports redefined
snippletswith an assignment statement. Or one of your other modules changedsys.path.Edit
“so the flow goes like this: add snipplets packages to path import…”
No.
Do not modify
sys.path— that way lies problems. Modifyingsite.pathleads to ambiguity about what is — or is not — on the path, and what order they are in.The simplest, most reliable, most obvious, most controllable things to do are the following. Pick exactly one.
Define
PYTHONPATH(once, external to your program). A single, simple environment variable that is nearly identical to installation on site-packages.Install your package in site-packages.