Use local copy of python package rather than the one installed in site-packages -
i've installed python based package in site-packages directory. however, i'm trying learn how code works i'd hack bunch putting in lots of print statements can understand code doing. @ end of day want clean installation without hacks in it.
of course copy original files else, make hacks, , @ end copy original files over. that's tedious. @ least, i'd install local copy of python package , have python script use copy preferentially (perhaps suitable statements @ top of script). perhaps isn't best way python development/hacking.
what's best solution problem? want able hack on package (and use package) without messing clean version.
the virtualenv-advice given correct, depending on actual package can go beyond , not mess site-packages inside virtualenv @ all.
if package setuptools-based, simple
$ python setup.py develop
from within working-copy of it's source, won't installed, instead hooked virtualenv pointing working-copy. advantage: can edit (and e.g. rollback using git or whatever scm package maintainer uses) files in well-defined , non-volatile location.
Comments
Post a Comment