Hi Giuseppe,

On 07/22/2013 12:39 AM, Giuseppe Profiti wrote:
> Hello,
> I would like to start extending graph-tools, but I wonder if it is possible 
> to have the official release (installed from the repository) along with a 
> custom compiled version.
> I don't know how python manages the libraries, so I'm wondering if it is 
> possible to either:
> - switch from one library to the other when running the python script (like 
> changing the classpath when running a java program)

You can specify the python module path by setting the environment
variable named PYTHONPATH. You can install the different versions in
different directories, and change the value of this variable each time
you want to switch versions. This can also be automated using the
virtualenv package: http://www.virtualenv.org

Just google PYTHONPATH and/or virtualenv and you will find all sorts of
guides/howtos.

> - change the library name, so I could do something like "import graph_tool" 
> to get the official version and "import graph_tool_mydevel" to get my 
> modified version

This wont work, since the module refers to itself internally at some
places by its standard name... You would have to change all theses
references as well.

Cheers,
Tiago

-- 
Tiago de Paula Peixoto <[email protected]>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to