Commit Graph

73 Commits

Author SHA1 Message Date
Martin v. Löwis 2681beb23e Patch #1677862: Require a space or tab after import in .pth files. 2007-03-12 11:01:10 +00:00
Kurt B. Kaiser d112bc7958 Patch #1540892: site.py Quitter() class attempts to close sys.stdin
before raising SystemExit, allowing IDLE to honor quit() and exit().

M    Lib/site.py
M    Lib/idlelib/PyShell.py
M    Lib/idlelib/CREDITS.txt
M    Lib/idlelib/NEWS.txt
M    Misc/NEWS
2006-08-16 05:01:42 +00:00
Neal Norwitz 6e482569c8 Update the docstring to use a version a little newer than 1999. This was
taken from a Debian patch.  Should we update the version for each release?
2006-08-15 04:59:30 +00:00
Nick Coghlan f2b16f3eb4 Fix site module docstring to match the code for Mac OSX, too 2006-06-12 08:23:02 +00:00
Nick Coghlan 3fb55ca80e Fix site module docstring to match the code 2006-06-12 08:19:37 +00:00
Neal Norwitz 0c469854bc Adjust whitespace. 2006-04-11 07:21:20 +00:00
Phillip J. Eby 4703211080 Updated the warnings, linecache, inspect, traceback, site, and doctest modules
to work correctly with modules imported from zipfiles or via other PEP 302
__loader__ objects.  Tests and doc updates are included.
2006-04-11 01:07:43 +00:00
Tim Peters 88ca467ca4 Whitespace normalization. 2006-03-10 23:39:56 +00:00
Georg Brandl 24cb053b15 Patch #1446372: quit and exit can now be called from the interactive
interpreter to exit.
2006-03-09 23:22:06 +00:00
Brett Cannon 4d0bddfee6 Fix bug in addsitedir() to properly handle the lack of a second argument.
Fixed to keep backwards-compatibility for the undocumented function.

Closes bug #986795.
2004-07-20 02:28:28 +00:00
Brett Cannon 12f8c4d2e3 Change argument list for addsitedir() to not require a second argument and thus
match old verion's argument list (overlooked since API of the file is
undocumented).
2004-07-09 23:38:18 +00:00
Tim Peters 4e0e1b6a54 Whitespace normalization. 2004-07-07 20:54:48 +00:00
Brett Cannon 0096e262ff Refactored site.py into functions. Also moved over to using sets.
New regression test suite.
2004-06-05 01:12:51 +00:00
Brett Cannon 46cf4fc249 Back out last patch that removed an entry from sys.path if it was not an
existent path.  Pointed out by jvr that entries could be non-file items for
custom importers.
2004-03-21 14:06:49 +00:00
Brett Cannon cc45466b8f Remove non-existent paths. 2004-03-20 21:31:33 +00:00
Brett Cannon 497331fa2b Fix how line endings were handled when iterating over a .pth file by stripping
all whitespace at the end of the path line.
2004-03-20 21:08:17 +00:00
Hye-Shik Chang 4a8d42f73f We have cp932 support in standard distribution now. And there's now
no major codepages unsupported by Python, so remove the eg. case.
2004-02-13 07:14:13 +00:00
Walter Dörwald 70a6b49821 Replace backticks with repr() or "%r"
From SF patch #852334.
2004-02-12 17:35:32 +00:00
Andrew MacIntyre 2e8a6e0ec6 To find the curses extension as a DLL (on OS/2), we need to adjust the
library search path to include the extension directory.  Without this,
the curses_panel extension can't find the curses extension/DLL, which
exports some curses symbols to it.
2003-12-02 12:27:25 +00:00
Walter Dörwald f0dfc7ac5c Fix a bunch of typos in documentation, docstrings and comments.
(From SF patch #810751)
2003-10-20 14:01:56 +00:00
Jeremy Hylton 6d58bf69ee Repair operator error. 2003-07-18 17:45:33 +00:00
Jeremy Hylton bdf3b509ed SF patch 773476: NameError when there are no prefixes. 2003-07-18 17:24:07 +00:00
Jack Jansen 470b0c0e1f In an OSX framework build Python could fail if HOME wasn't set, fixed.
Fixes #747954.
2003-06-03 10:55:35 +00:00
Martin v. Löwis a94568a753 Patch #734231: Update RiscOS support. In particular, correct
riscospath.extsep, and use os.extsep throughout.
2003-05-10 07:36:56 +00:00
Jack Jansen be5d707926 When on MacOSX, and only in a framework build, add
~/Library/Python/2.3/site-packages to sys.path, if it exists.
2003-04-16 13:12:21 +00:00
Martin v. Löwis 4eab486476 Patch #671666: Alias ANSI code page to "mbcs". 2003-03-03 09:34:01 +00:00
Just van Rossum 52e14d640b PEP 302 + zipimport:
- new import hooks in import.c, exposed in the sys module
- new module called 'zipimport'
- various changes to allow bootstrapping from zip files

I hope I didn't break the Windows build (or anything else for that
matter), but then again, it's been sitting on sf long enough...

Regarding the latest discussions on python-dev: zipimport sets
pkg.__path__ as specified in PEP 273, and likewise, sys.path item such as
/path/to/Archive.zip/subdir/ are supported again.
2002-12-30 22:08:05 +00:00
Tim Peters 230a60c6ec Whitespace normalization. 2002-11-09 05:08:07 +00:00
Marc-André Lemburg 7ccd30fa43 Fix a problem in site.py which triggers in case sys.path is empty.
Bugfix candidate for 2.2.2.
2002-09-19 11:11:27 +00:00
Fred Drake e80c0d3580 Add an XXX comment and a pointer to a full bug report. 2002-07-25 20:13:03 +00:00
Raymond Hettinger 54f0222547 SF 563203. Replaced 'has_key()' with 'in'. 2002-06-01 14:18:47 +00:00
Guido van Rossum 2e1c09c1fd Removed old Digital Creations copyright/license notices (with
permission from Paul Everitt).  Also removed a few other references to
Digital Creations and changed the remaining ones to Zope Corporation.
2002-04-04 17:52:50 +00:00
Andrew MacIntyre 5cef57131f OS/2 EMX port Library and regression test changes:
Lib/
    os.py
    os2emxpath.py   // added - OS/2 EMX specific path manipulation routines
    popen2.py
    site.py
  Lib/test/
    test_fcntl.py
    test_longexp.py
2002-02-24 05:32:32 +00:00
Neal Norwitz 34172d5316 SF #515020, delete global variables which are used only for temporary
values in for loops (dircase, prefix, sitedir).
2002-02-11 18:34:41 +00:00
Guido van Rossum facf24bdc7 Don't use Latex \code{...} in docstrings. 2001-12-17 16:07:06 +00:00
Barry Warsaw 6e1c576a4e Get rid of the stupid backslash in front of the column zero open
paren.  This was there to worm around a stupid XEmacs bug, but since I
can't tickle the bug in newer XEmacsen (just tried w/21.4.5) it's
possible the problem has been fixed.  We shouldn't have to be working
around editor bugs anyway.

If it crops up again, I'll report it (again) to the XEmacs crowd.
2001-12-17 15:40:24 +00:00
Guido van Rossum e2ae77b8b8 SF patch #474590 -- RISC OS support 2001-10-24 20:42:55 +00:00
Guido van Rossum e37e96df06 Correct the URL for the license (only used when the LICENSE[.txt] file
is not found).  Being fancy: insert the first 3 characters of
sys.version in the URL.
2001-10-02 18:27:09 +00:00
Martin v. Löwis 339d0f720e Patch #445762: Support --disable-unicode
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
2001-08-17 18:39:25 +00:00
Just van Rossum ba634b2ec3 Rewrote Jack's latest change so it does what it intended to do... 2001-08-15 21:20:42 +00:00
Jack Jansen 31b5323c84 Don't remove non-directories from sys.path on the mac: files
can be on sys.path too.
2001-08-15 12:07:46 +00:00
Fred Drake 7f5296e7c0 Make the add*() helper functions more robust for use after intialization
is complete:  recompute _dirs_in_sys_path each time these functions are
entered after module initialization is complete, and reset before
returning to user code.

This closes SF patch #442983.
2001-07-20 20:06:17 +00:00
Guido van Rossum 27451d0fc8 Copying this 2.1.1 bugfix to the trunk:
Fix showstopper SF bug #442983: use of site.addsitedir() was broken
because it references the global dirs_in_sys_path which is deleted.
The fix avoids deleting that global.

(My email through python.org or digicool.com is non-functional at the
moment; use gvanrossum@home.com to reach me.)
2001-07-20 14:57:12 +00:00
Fred Drake fd4ff52c22 Actually remove directories from sys.path if they do not exist; the intent
is to avoid as many stat() calls as we can.
2001-07-12 21:08:33 +00:00
Tim Peters 6a479f5488 PEP 250: Add lib/site-packages to sys.path on Windows; also sys.prefix
to sys.path if os.sep == ':' (Macs?).  See PEP 250.
2001-07-12 05:20:13 +00:00
Fred Drake 1fb5ce0323 Avoid using os.path.normcase() on sys.path elements; doing so causes paths
to be presented in an unfamiliar case on case-preserving filesystems.

This closes SF patch #436173.
2001-07-02 16:55:42 +00:00
Guido van Rossum 83213cc0a0 Add new built-in 'help' which invokes pydoc.help (with a twist). 2001-06-12 16:48:52 +00:00
Barry Warsaw 62d248892f Two minor changes for better Jython compatibility. Finn Bock says:
Change 1: Not all 'modules' in sys.modules have a
    sensible __file__ attribute. Some of our java package
    can have the __file__ attribute set to None.

    Change 2: In jython we have the jython license file in
    <root> and the CPython license file in <root>/Lib. By
    reversing the search sequence jython will find and
    show the jython license file before the CPython file.

Closes SF patch #405853.
2001-03-23 17:53:49 +00:00
Guido van Rossum d74fb6b12a RISCOS changes by dschwertberger. 2001-03-02 06:43:49 +00:00
Guido van Rossum 48eb9cd62f A hack to augment sys.path with the build/lib.<platform> directory
created by Andrew's setup.py script, *if* we're actually running from
the build directory.  (The test for that: whether the sys.path[-1]
ends in "/Modules".)

This has one disadvantage: it imports a fair amount of code from the
distutils package, just in order to be able to calculate the correct
pathname.  See if I care. :-)
2001-01-19 21:54:59 +00:00