How to add my own path into sys.path for python on FC4?

Robinson Tiemuqinke hahaha_30k at yahoo.com
Sat Mar 4 02:49:11 UTC 2006


Hi,

 I get an odd question to ask: how to recompile python
rpm package on FC4 to add my own path into python's
search
path, so that every user include root or apache on my
testbox can see it? 

 The default search path is:
testnode01.example.com root 20% python2.4 -c 'import
sys; print sys.path'
['', '/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2',
'/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload',
'/usr/lib/python2.4/site-packages']

But I would like it to be:

testnode01.example.com root 20% python2.4 -c 'import
sys; print sys.path'
['/example.com/sitepackages', '',
'/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2',
'/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload',
'/usr/lib/python2.4/site-packages']

 I've looked at the configure.sh script but there
isn't this option while perl does have.

Any ideas? Thanks.



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the fedora-list mailing list