[Python-checkins] CVS: python/dist/src/Lib site.py,1.22,1.23
Martin v. Löwis
python-dev@python.org
Thu, 11 Jan 2001 05:02:45 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv17450
Modified Files:
site.py
Log Message:
Patch #103134: Support import lines in pth files.
Index: site.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** site.py 2000/12/12 22:39:04 1.22
--- site.py 2001/01/11 13:02:43 1.23
***************
*** 24,28 ****
non-directories) are never added to sys.path; no directory is added to
sys.path more than once. Blank lines and lines beginning with
! \code{#} are skipped.
For example, suppose sys.prefix and sys.exec_prefix are set to
--- 24,28 ----
non-directories) are never added to sys.path; no directory is added to
sys.path more than once. Blank lines and lines beginning with
! \code{#} are skipped. Lines starting with \code{import} are executed.
For example, suppose sys.prefix and sys.exec_prefix are set to
***************
*** 105,108 ****
--- 105,111 ----
break
if dir[0] == '#':
+ continue
+ if dir.startswith("import"):
+ exec dir
continue
if dir[-1] == '\n':