Specify the developement version of a python module
Question: I want to add a new class to [PICOS, a python
module](http://picos.zib.de/v100/intro.html). I installed it the normal way a
long time ago. But now I have downloaded the source and I a am trying to make
some changes.

The problem is that I cannot manage to ask python to load the module from the
development folder and not the normal folder.

    
    
    reload(picos.constraint)
    
    Out[22]: <module 'picos.constraint' from '/home/optimi/bzffourn/python/lib/python2.7/site-packages/picos/constraint.pyc'>
    

while the source code are here:

    
    
    /home/optimi/bzffourn/ZIB/python_scripts/pyMathProg/picos
    

So the changes I make are not considered.


Answer: This should help you do it: [Override Python import
order](http://www.hasenkopf2000.net/wiki/page/how-override-pythons-module-
import-order/). Just change your import to this:

    
    
    import sys
    sys.path.insert(0,"/home/optimi/bzffourn/ZIB/python_scripts/pyMathProg/picos")
    import picos.constraint
    

