[Python-Dev] Problem with module loading on multi-arch?
"Martin v. Löwis"
martin at v.loewis.de
Fri Mar 17 09:31:44 CET 2006
Neal Becker wrote:
> 1. Does it make sense to have both
> My answer: definitely yes. We already agree that we should have both
> site-dep for binary code and site-indep for python code, so there is no way
> to avoid this.
I'm not sure I understand what you are talking about. What is site-dep
and site-indep? Where do we have that for binary code and for python
code? I know what prefix and exec_prefix are.
> 2. What should the module search do?
> I don't know the details of the current algorithm, but clearly it's going to
> have to deal correctly with the above.
It's very simple. Importing traverses sys.path.
> One possibility (and maybe this is how it already works?) is that the module
> search doesn't know anything about site-dep/site-indep, it simply has a
> list of paths to search.
Well, I don't know about site-dep/site-indep, so I wouldn't be surprised
if module search didn't, either.
> If I did want to try to fix this myself, where would I find the code for it?
The code for importing is in Modules/import.c. sys.path is defined in
More information about the Python-Dev