[chimera-dev] chimera import
Javier Díez
jdiezperezj at gmail.com
Mon Oct 2 11:38:53 PDT 2006
Hi again,
Thank you for your comments. From now I will never use the import
construction I wrote above.
But I have got another question.
Well, I'm using Eclipse and PyDev Extensions, and I seted the Eclipse Python
interpreter option using the Python version included in Chimera.
I also included the "share" in the Eclipse, PyDev PYTHONPATH, but it doesn't
works.
I thought it could work, but it doesn't.
I prefer Eclipse (because it is the enviroment I'm used to work with) to
the IDLE provided by Chimera.
Thank you any way.
Javi
On 10/2/06, Eric Pettersen <pett at cgl.ucsf.edu> wrote:
>
> Tom Goddard's comments are exactly correct, I just want to add some
> advice. If anyone else will be working on your code, you should try to
> avoid the "from module_name import *" construct because it makes it more
> difficult to find the place where a class is defined. Say for example you
> use a Point object in your code. A person trying to find the definition for
> Point first has to look through the file using Point to see if it's defined
> there, then through each module from which you've imported "*" to look for
> it. It is better to import just the names you are going to use, something
> like: "from chimera import Point, openModels, Molecule". That statement
> makes it clear where the definition of Point is going to be found.
> The other thing is that the "chimera" module imports all the names from
> _chimera, so typically you import from chimera rather than _chimera. I know
> that the chimera uses the "from _chimera import *" construct, which seems
> somewhat hypocritical given the advice above, but it is being used to make
> C++ classes/functions that "logically" belong in the chimera module
> available.
>
> --Eric
>
> Eric Pettersen
>
> UCSF Computer Graphics Lab
>
> pett at cgl.ucsf.edu
>
> http://www.cgl.ucsf.edu
>
>
> On Oct 2, 2006, at 5:44 AM, Javier Díez wrote:
>
> Hy,
> I've just started working on a Chimera extension.
> I've tried to import chimera after setting up the CHIMERA os variable, but
> it gives me this erro message:
> ***from _chimera import *
> ImportError: No module named _chimera
> *Some help?
> Thank you.
> Javi
> *
> *
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20061002/5f43fcda/attachment.html>
More information about the Chimera-dev
mailing list