Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upImpossible to import module in current working directory #83
Comments
tlescoat
referenced this issue
Dec 22, 2015
Open
Unable to import modules/classes from other pacakges #74
This comment has been minimized.
This comment has been minimized.
|
Have you tried setting the For what it's worth, it looks like you're frustrated by Python's module import semantics rather than |
This comment has been minimized.
This comment has been minimized.
|
Thanks for your quick answer ! Yes, I tried in a vm, but in general I find using pythonpath highly inconvenient. Also, the point of this tool is to be lightweight (as I understood) and requiring users to make a virtualenv / modifying an environment variable kinda defeats this objective. Also, on a security side, this change of sys.path and/or PYTHONPATH are the same |
This comment has been minimized.
This comment has been minimized.
All you need to do:
I disagree. Requiring users to develop code idiomatically (i.e., I won't accept a patch that modifies |
BurntSushi
closed this
Dec 22, 2015
This comment has been minimized.
This comment has been minimized.
|
Additionally, modifying |
tlescoat commentedDec 22, 2015
It is currently impossible to document a module locally defined. It makes working with pdoc painful. Given the following folder structure:
The following doesn't work:
pdoc will only find
__init__.py, however since the current working directory is not insys.pathpython will not import the whole module. It won't even generate documentation for variables / functions in__init__.py...The fix is simple, add these two lines to pdoc:405:
Then you can now work in any directory