WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [PATCH] Make non-native python path handling a fallback

To: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] Make non-native python path handling a fallback
From: Jeremy Katz <katzj@xxxxxxxxxx>
Date: Fri, 15 Apr 2005 17:08:47 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 15 Apr 2005 21:09:06 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D1E3BC9@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <A95E2296287EAD4EB592B5DEEFCE0E9D1E3BC9@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 2005-04-15 at 21:58 +0100, Ian Pratt wrote: 
>  > Although I don't really agree with the installing of the 
> > python bits to the non-native paths, I can see where it's 
> > useful as long as the module ABI doesn't change if you're 
> > trying to distribute binary tarballs.  But with the current 
> > handling it adds module lookup costs for the native path case 
> > (which would be the norm) as well as prevents using 
> > PYTHONPATH to look to a different location for the modules.
> > 
> > The attached patch changes things so that at first, the xen 
> > module is attempted to be imported from the stock paths.  If 
> > we get an ImportError exception, then it adds /usr/lib/python 
> > to the end of the python path and imports again.
> 
> Do you prefer this to just unconditionally addding /usr/lib/python to
> the end of the path rather than the front?

Slightly, but just because having /usr/lib/python in my sys.path is
ugly :-)  I can look over it, though... patch doing that attached

Signed-off-by: Jeremy Katz <katzj@xxxxxxxxxx>

Jeremy

Attachment: xen-python-paths.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>