Skip to content
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.

Make module profiling easier #8

Open
letmaik opened this issue Nov 12, 2014 · 1 comment
Open

Make module profiling easier #8

letmaik opened this issue Nov 12, 2014 · 1 comment

Comments

@letmaik
Copy link

letmaik commented Nov 12, 2014

I want to run kernprof from the root of my package source like kernprof -l mylib\test\test.py -v but then any import within test.py fails, e.g. import mylib.foo because the current working dir is not added to the python path when running kernprof, which in my opinion should happen by default. The workaround is to temporarily hack sys.path within this specific module, but that's annoying.

@letmaik letmaik changed the title Make module testing easier Make module profiling easier Nov 12, 2014
@1fish2
Copy link

1fish2 commented Mar 24, 2018

I'm using the same workaround, but would this simpler command-line trick work?

PYTHONPATH=$PWD:$PYTHONPATH kernprof -lv mylib\test\test.py

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants