summaryrefslogtreecommitdiffstats
path: root/Lib/getopt.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #11621: fix bootstrap issue with getopt/gettext (following d3e46930ffe9)Antoine Pitrou2011-03-211-1/+5
|
* Mark getopt error messages as localizable (fixes #11371).Éric Araujo2011-03-201-7/+8
| | | | Patch by Filip Gruszczyński.
* remove pointless coding cookiesFlorent Xicluna2010-08-301-1/+0
|
* Issue #4629: getopt raises an error if an argument ends with = whereas getoptVictor Stinner2010-07-241-1/+1
| | | | | doesn't except a value (eg. --help= is rejected if getopt uses ['help='] long options).
* Merged revisions 67463,67572,67576,67628 via svnmerge fromGeorg Brandl2008-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r67463 | skip.montanaro | 2008-12-01 02:55:22 +0100 (Mon, 01 Dec 2008) | 1 line typo in comment ........ r67572 | georg.brandl | 2008-12-05 10:23:14 +0100 (Fri, 05 Dec 2008) | 2 lines #4458: recognize "-" as an argument, not a malformed option in gnu_getopt(). ........ r67576 | georg.brandl | 2008-12-05 13:09:41 +0100 (Fri, 05 Dec 2008) | 2 lines #4529: fix parser's validation for try-except-finally statements. ........ r67628 | skip.montanaro | 2008-12-07 03:16:00 +0100 (Sun, 07 Dec 2008) | 1 line muffed the default case ........
* Change a bunch of file encodings from Latin-1 to UTF-8.Guido van Rossum2007-07-161-2/+2
| | | | | | | Remove the encoding from Tix.py (it doesn't seem to need one). Note: we still have to keep the "coding: utf-8" declaration for files that aren't pure ASCII, as the default per PEP 3120 hasn't been implemented yet.
* Fix most trivially-findable print statements.Guido van Rossum2007-02-091-1/+1
| | | | | | | | | There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
* A few naughty external scripts do 'raise getopt.error, "blah"', andAndrew M. Kuchling2003-02-061-1/+1
| | | | | now crash because two arguments are expected. Add a default value to keep those scripts running.
* Add encoding declaration.Martin v. Löwis2002-08-041-0/+1
|
* Use os.environ.get() in stead of os.getenv() (which is platform-dependent).Jack Jansen2002-07-261-1/+1
|
* Whitespace normalization.Tim Peters2002-07-161-2/+2
|
* gnu_getopt should be exported in __all__Skip Montanaro2002-06-071-1/+1
|
* Use isinstance for the type check, use booleans.Martin v. Löwis2002-06-061-4/+4
|
* Patch 473512: add GNU style scanning as gnu_getopt.Martin v. Löwis2002-06-061-2/+68
|
* Convert a pile of obvious "yes/no" functions to return bool.Tim Peters2002-04-041-2/+2
|
* Wrapped a long line.Fred Drake2001-12-121-3/+4
| | | | Converted to use "".startswith() to avoid slicing (& temp string creation).
* more __all__ updatesSkip Montanaro2001-01-201-0/+2
|
* GetoptError is always initialized with exactly two parameters, so simplifyFred Drake2001-01-081-7/+4
| | | | the constructor.
* getopt used to sort the long option names, in an attempt to simplifyTim Peters2000-12-291-12/+2
| | | | | | | the logic. That resulted in a bug. My previous getopt checkin repaired the bug but left the sorting. The solution is significantly simpler if we don't bother sorting at all, so this checkin gets rid of the sort and the code that relied on it.
* Fix for SF bugTim Peters2000-12-271-13/+30
| | | | | | https://sourceforge.net/bugs/?func=detailbug&bug_id=126863&group_id=5470 "getopt long option handling broken". Tossed the excruciating logic in long_has_args in favor of something obviously correct.
* Gerrit forgot to remove the "import string".Guido van Rossum2000-02-251-2/+0
|
* Gerrit Holl's patch to move attribution from the docstring to aFred Drake2000-02-251-4/+4
| | | | comment. <gerrit@nl.linux.org>
* Actually, the previous batch's comment should have been different;Guido van Rossum2000-02-041-1/+1
| | | | | | | | | | *this* set of patches is Ka-Ping's final sweep: The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac.
* Contribution from Gerrit Holl:Guido van Rossum1999-12-211-8/+26
| | | | | | | | | This patch changes the string-based exceptions to class-based exceptions, so that you can fetch the unknown option as an attribute. As far as I know, it is backward compatible. [The new exception class is called GetoptError; the name error is an alias for compatibility.]
* Accept a non-list sequence for the long options (request by Jack Jansen).Guido van Rossum1998-11-171-39/+54
| | | | | | | | | | | | | Because it might be a common mistake to pass a single string, this situation is treated separately. Since we were making a copy of the longopts list anyway, we now use the list() function -- this made it necessary to change all uses of the local variable (and argument) 'list' to something more meaningful, i.e., 'opts'. Also added docstrings (copied from the library manual) and removed the (now redundant) module comments.
* Mass check-in after untabifying all files that need it.Guido van Rossum1998-03-261-41/+41
|
* Layout and cleanup by FredGuido van Rossum1996-09-111-82/+76
|
* Rewritten by Lars Wizenius to add long optionsGuido van Rossum1996-09-091-25/+90
|
* Bugfix: it choked on an empty argument!Guido van Rossum1992-01-091-1/+1
|
* New == syntaxGuido van Rossum1992-01-011-5/+5
|
* Initial revisionGuido van Rossum1990-10-131-0/+47