0
0
mirror of https://github.com/python/cpython.git synced 2024-12-01 11:15:56 +01:00
Commit Graph

137 Commits

Author SHA1 Message Date
Guido van Rossum
a8b37ad9ff Scrit by Marc-Andre Lemburg to generate htmlentitydefs.py. 1999-08-19 16:00:41 +00:00
Guido van Rossum
a74c55662f Mark Hammond writes:
"""
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.
1999-07-30 17:48:20 +00:00
Guido van Rossum
d68a4bd56c Use re instead of regex.
Don't rewrite the file in place.
(Reported by Andy Dustman.)
1999-04-09 14:56:35 +00:00
Guido van Rossum
bd3bdde70b For reasons I dare not explain, this script should always execute
main() when imported (in other words, it is not usable as a module).
1999-04-02 22:18:25 +00:00
Guido van Rossum
02ef28b9a9 Tim Peters writes:
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>.
1999-03-28 17:55:32 +00:00
Guido van Rossum
a3433e89eb Tim Peters writes:
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.
1999-03-27 13:34:01 +00:00
Fred Drake
b091134e70 During display, if EPIPE is raised, it's probably because a pager was
killed.  Discard the error in that case, but propogate it otherwise.
1999-03-26 22:36:00 +00:00
Andrew M. Kuchling
dc86a4e5bb Added a -q ('quiet') option to tabnanny, which causes only the names of
offending files to be printed.  Good for emacs `tabnanny.py *.py`
1998-12-18 13:56:58 +00:00
Guido van Rossum
5cd975c678 Patch by Chris Herborth:
BeOS headers live in various non-standard places;
luckily, there's an environment variable that lists them all.
1998-12-17 18:02:15 +00:00
Guido van Rossum
8fd0f147e7 Detlef Lannert lannert@lannert.rz.uni-duesseldorf.de notices:
"""
the NEWS file of Python 1.5.2a2 inspired me to look at
Tools/scripts/untabify.py. I wonder why it accepts a -t argument
but ignores it. The following patch tries to make it somewhat useful
(i.e., to override the tabsize=8 setting). Is that agreeable?
"""
1998-10-20 15:33:33 +00:00
Guido van Rossum
e33bba8d3d New version that is much more compact and easier to maintain. (Sjoerd) 1998-10-09 13:27:49 +00:00
Guido van Rossum
9c2c1e88a3 Fix multi-arg list.append() calls. 1998-10-08 15:24:48 +00:00
Guido van Rossum
a57c9b928d Added a whole bunch of descriptions. 1998-10-07 19:52:35 +00:00
Guido van Rossum
19b23e538e Use the imp module to get the magic word. 1998-10-07 19:45:33 +00:00
Guido van Rossum
41f13f288f Added #! line 1998-10-07 14:46:09 +00:00
Guido van Rossum
f9a6d7d494 Print serious errors to stderr instead of stdout. 1998-09-14 16:22:21 +00:00
Guido van Rossum
caf9fca35a nannified 1998-09-14 16:03:02 +00:00
Guido van Rossum
a53f30babc nannified 1998-09-14 15:57:09 +00:00
Guido van Rossum
4e96ec6a4e nannified. 1998-09-14 15:56:40 +00:00
Guido van Rossum
09eea82005 Utility to replace CRLF with LF in argument files. 1998-09-14 15:46:41 +00:00
Guido van Rossum
499a6e5fd4 Utility to replace LF with CRLF in argument files. 1998-09-14 15:46:15 +00:00
Guido van Rossum
ce85827ac1 Utility to untabify stubber results. 1998-09-14 15:43:38 +00:00
Guido van Rossum
ee60eb127b New tool: reverse grep (greps from the end). Uses a fairly efficient
strategy to read from the end of the file.
1998-08-12 17:47:52 +00:00
Guido van Rossum
e7f3953142 A script by Mark-Andre Lemburg to produce the PC/python_nt.def file
automatically.
1998-08-10 13:12:22 +00:00
Guido van Rossum
b3bf2cd64b # The variable total is never used somehow. I think I had plans for
# it but can't remember what.  Get rid of a comparison that breaks.
1998-07-02 22:17:28 +00:00
Guido van Rossum
a25969620a Fix by Sjoerd Mullender to support symbolic links and make a backup of
.mirrorinfo.  Fix by me to call string.lstrip(filename) to cope with a
bug in strop.strip() in Python 1.4.  Additionally, I changed all print
statements that print filenames etc. to put them in backquotes so that
it will be more obvious when there's a funny character on one of them
(such as a space...).
1998-06-29 23:17:16 +00:00
Guido van Rossum
f57736e77a Translated to use re instead of regex. Also replaced one use of
L.append(a,b,c,d) with the correct L.append((a,b,c,d)).
1998-06-19 21:39:27 +00:00
Guido van Rossum
aa2a7a4ae6 From: "Tim Peters" <tim_one@msn.com>
The 1.5.1 tabnanny.py suffers an assert error if fed a script whose last
line is both indented and lacks a newline:

if 1:
    print 'oh fudge' # no newline here:

The attached version repairs that.
1998-06-09 19:02:21 +00:00
Guido van Rossum
1f05cb007a OK, here's a different way to implement the same thing -- this version
also supports filenames with multiple spaces in their name :-)
1998-05-12 22:45:43 +00:00
Guido van Rossum
aeeda5b276 Support filenames with spaces in their names (for non-Mac ftp servers).
This patch must hold the world record for living in my inbox:

  From: John Ehresman <jehresma@dsg.harvard.edu>
  Date: Wed, 23 Aug 1995 16:07:11 -0400

He provided a fix for the version that comes with Python 1.3:
ftpmirror.py revision 1.1...  And it was still relevant!
1998-05-12 22:36:11 +00:00
Guido van Rossum
27c225e826 Add the specific sed statement to recover the second output file to
the comments.
1998-05-08 21:04:06 +00:00
Guido van Rossum
83b851885d Adding Tim Peters' ndiff utility.
This is handy for comparing plain-text documentation files,
since it displays intra-line differences.
1998-05-06 17:43:30 +00:00
Guido van Rossum
53117ae82a typo in error message (fname vs. file).
(Jack)
1998-04-28 16:01:13 +00:00
Barry Warsaw
6a508aef7d Use the (new) standard script #! line
Convert to re module; remove all references to regexp and regsub

Added support for the new texinfo @url{} and @email{} commands
1998-04-23 22:59:33 +00:00
Guido van Rossum
ce73acf5e6 Tim's version 4, with my mods 1998-04-10 19:14:59 +00:00
Guido van Rossum
8053d89f7b Add usage message when no arguments. 1998-04-06 14:45:26 +00:00
Guido van Rossum
f4b44fa6ef Tim's latest version (supports old and new tokenize modules) 1998-04-06 14:41:20 +00:00
Guido van Rossum
9ab75cbaab Tim Peters' program for checking whether a program's indentation is
sensitive to tab size.  Uses a different strategy than tabpolice.py,
but has compatible usage.
1998-03-31 14:31:39 +00:00
Guido van Rossum
97df7f8679 Add -q option that *just* prints the filename. 1998-03-26 19:23:43 +00:00
Guido van Rossum
ed5b3d8b3c give in to tab police 1998-03-24 05:30:29 +00:00
Guido van Rossum
3db0e3713c Report first line with inconsistent tab usage. 1998-03-24 04:58:04 +00:00
Guido van Rossum
6f73c1a2ac The Tab Police watches for possibly inconsistent indentation. 1998-03-20 19:23:04 +00:00
Guido van Rossum
fdc5adc594 Dangerous feature added: when removing local files (i.e., only when -r
is used), do a recursive delete.  Use -r with even more caution!
Also changed usage message into a doc string, added a comment or two,
and rearranged a long line.
1998-01-04 02:03:12 +00:00
Guido van Rossum
ca83f018e7 Added "-n file" option to only print files newer than the given file. 1997-11-24 23:49:35 +00:00
Guido van Rossum
79b2038aa4 When checking for equality, open the slave file in text mode so it
will compare equal even if the master file uses only \n to terminate
lines (this is by far the most common situation).  Also, check for the
case where the master file is missing, and print the time difference
in seconds when the slave file appears newer than the master (for
debugging).
1997-11-04 17:35:43 +00:00
Guido van Rossum
9476a78c1e Remove "." or "" from front of sys.path (this bit me once). 1997-10-20 23:48:01 +00:00
Guido van Rossum
9971f689cb Fix comment to add the all-important trailing colon to the example.
Print the author with the revision date and filename.
1997-10-06 21:09:32 +00:00
Guido van Rossum
b81b5c72db Moved pystone to Lib/test. Use import test.pystone to run it. 1997-09-16 18:57:42 +00:00
Guido van Rossum
d2ba3690ce Skip symlinks; don't bother keeping a list of files that is never used. 1997-09-16 18:57:14 +00:00
Guido van Rossum
92dfa4ffe1 Use correct keyword parameter when calling copy with answer option! 1997-08-18 20:56:10 +00:00