System default sys.path

B

Brock Pytlik

Hi, I'm trying to find a way to get the value sys.path would have on a
particular system if python was started with an empty python path. I do
want it to include the site specific additional paths. I know I can hack
this information myself, but I'd rather be able to get this on demand so
that if things change in the future, I don't have grovel around looking
for which directory string to change.

If nothing else, I think the following would satisfy my needs:
1) a variable containing the directories to use as a prefix (I think
sys.exec_prefix and sys.prefix are what I want here)
2) a variable containing the list of suffixes that are applies to the
prefixes, like lib/python<version>/site-packages
3) a way of handing the *.pth files

Thanks in advance for the help,
Brock
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top