Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9155647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:38:02+00:00 2026-06-17T12:38:02+00:00

I have a clean virtual machine with XP SP3 32-bit and ActivePython 2.7.2 32-bit

  • 0

I have a clean virtual machine with XP SP3 32-bit and ActivePython 2.7.2 32-bit community edition, current dir is “C:\test”. I have placed sitecustomize.py with “print( ‘dir1’ )” code indie “C:\test\dir1” and sitecustomize.py with “print( ‘dir2’ )” code indie “C:\test\dir2”.

If i set PYTHONPATH to dir1 or dir2, corresponding sitecustomize.py is executed:

C:\test> set PYTHONPATH=C:\test\dir1\
C:\text> python
dir1
>>>exit()
C:\test> set PYTHONPATH=C:\test\dir2\
C:\text> python
dir2

But if i add both dirs to pythonpath, only sitecustomize.py of first dir is executed:

C:\test> set PYTHONPATH=C:\test\dir1\;C:\test\dir2\
C:\text> python
dir1
>>>exit()
C:\test> set PYTHONPATH=C:\test\dir2\;C:\test\dir1\
C:\text> python
dir2

So is it possible to have multiple dirs in PYTHONPATH and multiple sitecustomize.py or i’m limited to one? Documentation states that i can have many dirs in PYTHONPATH, but it don’t say anything about sitecustomize.py

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:38:03+00:00Added an answer on June 17, 2026 at 12:38 pm

    Yes, you can list multiple directories in PYTHONPATH.

    sitecustomize is a module that automatically gets imported when the interpreter starts up. Consequently, if there are several sitecustomize.py on your PYTHONPATH, only the first one will be loaded.

    The process is described in the documentation:

    After these path manipulations, an attempt is made to import a module named sitecustomize, which can perform arbitrary site-specific customizations. It is typically created by a system administrator in the site-packages directory. If this import fails with an ImportError exception, it is silently ignored.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have basic idea on Kilo Virtual Machine on Mobiles , I have clear
I have Oracle11Gr2 installed on virtual WindowsXP Sp3 with VMWare Player . Just after
I have program that I want to test on clean Windows installation. For now
I have implemented clean URLs using the following in my .htaccess RewriteEngine on RewriteCond
I have a clean Eclipse Java SDK. I would like to make it suitable
I am developing a php web site. Here I have implemented clean URL using
I have question about clean thory in Python. When: @decorator_func def func(bla, alba): pass
I have a nice clean domain layer in my app that was developed in
For doing builds, packaging files up, etc, it's needed to have a completely clean
I have simple algorithm that clean the whitespace from half string until end. Here

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.