summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
Commit message (Collapse)AuthorAgeFilesLines
* + A msg on c.l.py reminded me that docstrings can be implicitly catenated.Tim Peters2001-08-131-28/+48
| | | | | | | Cater to that. + Major speed boost via not reading more of files than necessary. This was no slouch before; now it screams. + Improve msg when giving up on a goofy future statement.
* SF patch #445412 extract ndiff functionality to difflib, fromTim Peters2001-08-121-226/+15
| | | | David Goodger.
* Tool to delete (or just rewrite parts of) obsolete future statements.Tim Peters2001-08-121-0/+256
|
* When representing #includes as imports, do from MOD import *.Martin v. Löwis2001-08-091-1/+1
|
* Patch #437683: Use re instead of regex.Martin v. Löwis2001-08-091-33/+38
| | | | | | | If multiple header files are processed simultaneously which include each other, the corresponding modules mport each other. Specifically, if h2py is invoked with sys/types.h first, later header files won't contain the complete contents of TYPES.py.
* Rename pydoc.pyw to pydocgui.pyw: Since we changed Python to allow .pywTim Peters2001-08-052-2/+5
| | | | files to satisfy imports, pydoc.pyw was just importing itself!
* Use string.ascii_letters instead of string.letters (SF bug #226706).Fred Drake2001-07-202-4/+4
|
* This is a trivial command line utility to print MD5 checksums.Guido van Rossum2001-06-221-0/+32
| | | | | | | | | | I published it on the web as http://www.python.org/2.1/md5sum.py so I thought I might as well check it in. Works with Python 1.5.2 and later. Works like the Linux tool ``mdfsum file ...'' except it doesn't take any options or read stdin.
* Patch #430754: Makes ftpmirror.py .netrc awareMartin v. Löwis2001-06-071-3/+10
|
* Moved the encoding map building logic from the individual mappingMarc-André Lemburg2001-05-161-3/+1
| | | | | | codec files to codecs.py and added logic so that multi mappings in the decoding maps now result in mappings to None (undefined mapping) in the encoding maps.
* Fix several bugs and add two features.Jeremy Hylton2001-05-081-34/+88
| | | | | | | | | | | | | | | | | | | | | | | | | Assertion error message had typos in arguments to string format. .cover files for modules in packages are now put in the right place. The code that generate .cover files seemed to prepend a "./" to many absolute paths, causing them to fail. The code now checks explicitly for absolute paths and leaves them alone. In trace/coverage code, recover from case where module has no __name__ attribute, when e.g. it is executed by PyRun_String(). In this case, assign modulename to None and hope for the best. There isn't anywhere to write out coverage data for this code anyway. Also, replace several sys.stderr.writes with print >> sys.stderr. New features: -C/--coverdir dir: Generate .cover files in specified directory instead of in the directory where the .py file is. -s: Print a short summary of files coverred (# lines, % coverage, name)
* Append the revision number for each file to the output.Guido van Rossum2001-04-101-1/+1
| | | | | | (Yes, this is a new feature right before the 2.1 release. No, I can't imagine this would seriously break anybody's code. In fact, most users of this script are probably *happy* to see this addition.)
* Script for starting pydoc with a GUI in Windows.Ka-Ping Yee2001-03-231-0/+2
|
* Call main routine in pydoc module (pydoc.cli).Ka-Ping Yee2001-03-011-76/+2
|
* Add script form of pydoc so that it's present in beta1. CurrentlyAndrew M. Kuchling2001-02-281-0/+78
| | | | | | this just copies the __name__=='__main__' logic from pydoc.py. ?!ng can decide whether he wants to create a main() in pydoc, or rip it out of pydoc.py completely.
* Moved SequenceMatcher from ndiff into new std library module difflib.py.Tim Peters2001-02-101-292/+2
| | | | | | | | | Guido told me to do this <wink>. Greatly expanded docstrings, and fleshed out with examples. New std test. Added new get_close_matches() function for ESR. Needs docs, but LaTeXification of the module docstring is all it needs. \CVS: ----------------------------------------------------------------------
* Hand repair of cases where reindent changed lines of the formTim Peters2001-01-176-18/+18
| | | | | | | | | | | \t\t\t\t\treal code ##\t\t\t\t\tunused code \t\t\t\t\treal code via untabifying and shifting the real code left. Semantically the same but made the intent of the commented-out-in-column-0 unused code unclear. The exact same unused code appears to have gotten copied from file to file over the years.
* Whitespace normalization.Tim Peters2001-01-1734-2357/+2356
|
* This patch changes the default behaviour of the builtin charmapMarc-André Lemburg2001-01-031-11/+39
| | | | | | | | | | | | | | | | codec to not apply Latin-1 mappings for keys which are not found in the mapping dictionaries, but instead treat them as undefined mappings. The patch was originally written by Martin v. Loewis with some additional (cosmetic) changes and an updated test script by Marc-Andre Lemburg. The standard codecs were recreated from the most current files available at the Unicode.org site using the Tools/scripts/gencodec.py tool. This patch closes the bugs #116285 and #119960.
* SF bug 124051: ndiff "?" lines can be confusing. Well, they still can, butTim Peters2000-12-091-28/+19
| | | | after implementing it I liked Gregor's two-"?" line idea a lot.
* Hack ndiff to display lines w/ leading tabs more intuitively. This synchsTim Peters2000-11-011-9/+24
| | | | ndiff w/ a custom version I made for Guido during the pre-2.0 freeze.
* I'm moving redemo.py here from Demo/tkinter/guido, since it isGuido van Rossum2000-10-061-0/+171
| | | | | | | somewhat useful to learn regular expressions, and this way it'll be installed on Windows. This closes bug report 115609.
* New tool for normalizing indentation of .py files.Tim Peters2000-10-051-0/+258
|
* satisfy the tabnannyJeremy Hylton2000-09-183-358/+358
|
* Allow this script to act like a module by only calling main() ifBarry Warsaw2000-09-161-1/+3
| | | | __name__ == '__main__'. Closes SF bug #110844.
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-19/+4
| | | | This should match the situation in the 1.6b1 tree.
* Rob Hooft, Moshe Zadka: converted to 4 space indents and re instead of regex.Guido van Rossum2000-09-012-72/+78
|
* Python code coverage tool by Skip Montanaro and Andrew DalkeJeremy Hylton2000-08-031-0/+661
|
* add expandtabs command (-e)Peter Schneider-Kamp2000-07-111-37/+64
| | | | change eliminate to delete (-d)
* Change copyright notice.Guido van Rossum2000-06-301-21/+6
|
* Running the program through itself reveals that one end tag wasGuido van Rossum2000-06-281-1/+1
| | | | | | | | | | mislabeled. (Using -c and then -e rearranges some comments, so I won't check that in -- but it's a good test anyway. Note that pindent is not perfect -- e.g. it doesn't know about triple-quoted strings!)
* Peter Schneider-Kamp:Guido van Rossum2000-06-281-10/+75
| | | | | | | | | | | | | Problem: A Python program can be completed and reformatted using Tools/scripts/pindent.py. Unfortunately there is no option for removal of the generated "# end"-tags. Although a few Python commands or a "grep -v '# end '" can do wonders here, there are two drawbacks: - not everyone has grep/time to write a Python script - it is not checked whether the "# end"-tags were used validly Solution: add extra option "-e" (eliminate) to pindent.py
* Of course, I forget how to type long ago...Fred Drake2000-03-171-1/+1
| | | | Typo noted by /F.
* "write marshalled" --> "writes marshalled" (in docstring); noted byFred Drake2000-03-171-1/+1
| | | | Detlef Lannert <lannert@lannert.rz.uni-duesseldorf.de>.
* Marc-Andre Lemburg: addedGuido van Rossum2000-03-102-0/+290
| | | | gencodec.py - Create Python codecs from Unicode mapping files
* Correct type error in getopt.error handling code.Guido van Rossum2000-02-291-1/+1
|
* Script by Tim Peters to discover illegal append() calls.Guido van Rossum2000-02-291-0/+168
|
* Fix multi-arg append().Guido van Rossum2000-02-291-1/+1
|
* Deleting tabpolice.py; it was superceded by tabnanny.py long ago.Guido van Rossum2000-02-231-104/+0
|
* Moved tabnanny.py to standard library status.Guido van Rossum2000-02-231-368/+0
|
* Patch by Gerrit Holl:Guido van Rossum2000-02-142-4/+4
| | | | * In crlf.py and lfcr.py: regsub -> re
* Patch by Gerrit Holl:Guido van Rossum2000-02-141-2/+6
| | | | | | * In logmerge.py: added '-r' flag to show the oldest checkin first instead of the newest, and getopt.getopt was used wrong.
* Scrit by Marc-Andre Lemburg to generate htmlentitydefs.py.Guido van Rossum1999-08-191-0/+65
|
* Mark Hammond writes:Guido van Rossum1999-07-301-1/+3
| | | | | | | | | | | | | | | | """ If the filename being complained about contains a space, enclose the file-name in quotes. The reason is simply that when I try and parse tabnanny's output, filenames with spaces make it very difficult to determine where the filename stops and the linenumber begins! """ Tim approves. I slightly changed the patch (use 'in' instead of string.find()) and arbitrarily bumped the __version__ variable up to 6.
* Use re instead of regex.Guido van Rossum1999-04-091-10/+11
| | | | | Don't rewrite the file in place. (Reported by Andy Dustman.)
* For reasons I dare not explain, this script should always executeGuido van Rossum1999-04-021-2/+1
| | | | main() when imported (in other words, it is not usable as a module).
* Tim Peters writes:Guido van Rossum1999-03-281-24/+53
| | | | | | | | I should have waited overnight <wink/sigh>. Nothing wrong with the one I sent, but I couldn't resist going on to add new -r1 / -r2 cmdline options for recreating the original files from ndiff's output. That's attached, if you're game! Us Windows guys don't usually have a sed sitting around <wink>.
* Tim Peters writes:Guido van Rossum1999-03-271-160/+88
| | | | | | | Attached is a cleaned-up version of ndiff (added useful module docstring, now echo'ed in case of cmd line mistake); added -q option to suppress initial file identification lines; + other minor cleanups, & a slightly faster match engine.
* During display, if EPIPE is raised, it's probably because a pager wasFred Drake1999-03-261-3/+8
| | | | killed. Discard the error in that case, but propogate it otherwise.
* Added a -q ('quiet') option to tabnanny, which causes only the names ofAndrew M. Kuchling1998-12-181-3/+7
| | | | offending files to be printed. Good for emacs `tabnanny.py *.py`