[clam-devel] ipyclam: modules installation

Xavier Serra Román xvr.serra at gmail.com
Thu Jul 28 09:52:25 PDT 2011


I know about the __init__.py, I have "import ipyclam" working when doing it
in the root of clam repository just not when copying all the py files to 
/usr/local/lib/python/ipyclam.

I'll try with setting the PYTHONPATH at $HOME and check if I can make it
work there.

Bye!


On Jul 28, 2011, at 1:31 PM, David García Garzón wrote:

> On one side, you have add this to ~/.bashrc
> export PYTHONPATH=~/local/lib/python
> 
> On the other, in order to build up the module you have to install all in a 
> single directory ~/local/lib/python/ipyclam/ and creating a __init__.py file 
> on it. Then, in that file, do:
> 
> from Network import Network
> from Dummy_NetworkProxy import Dummy_NetworkProxy
> from Clam_NetworkProxy import Clam_NetworkProxy
> 
> Try just to import the ones we need to call the constructor. Do not expose too 
> much classes to the final user.
> 
> David.
> 
> On Wednesday 27 July 2011 23:47:09 Xavier Serra Román wrote:
>> David, I was working on "import ipyclam" to import all the classes at once
>> and I saw that the installation doesn't work. The default installation with
>> scons which points at $HOME/local/lib/python doesn't seem to work for me.
>> ipython can't find the modules there.
>> 
>> When I set the prefix to be at /usr/local it works. I don't know if this is
>> the best solution though, because copying them to
>> /usr/local/lib/python/ipyclam didn't make "import ipyclam" work... Maybe
>> we should consider distutils for installation or investigate more with
>> scons.
>> 
>> I know this isn't a priority right now, but I kinda liked using "import
>> ipyclam" and have all the classes into the ipyclam namespace..
>> 
>> Bye!
>> 
>> PS:
>> _______________________________________________
>> clam-devel mailing list
>> clam-devel at lists.clam-project.org
>> http://lists.clam-project.org/listinfo.cgi/clam-devel-clam-project.org




More information about the clam-devel mailing list