Skip Montanaro
165163f245
add usage() function, -h(elp) flag and long versions of short flags
2004-03-27 18:43:56 +00:00
Skip Montanaro
e2b61e0190
* explain flags in doc strings
...
* reverse order of files on the command line in pickle2db.py to make it
symmetrical with db2pickle.py in the two-arg case (src, then dest)
2004-03-03 17:42:08 +00:00
Walter Dörwald
70a6b49821
Replace backticks with repr() or "%r"
...
From SF patch #852334 .
2004-02-12 17:35:32 +00:00
Skip Montanaro
f91c59a06b
add hotshotmain.py ref
2004-01-27 14:47:23 +00:00
Skip Montanaro
4aba6f51cb
The bagpipe didn't say "no" (*), so here's a main program script useful for
...
running an application under hotshot's control. Only slightly embellished
from what Walter Dörwald posted to python-dev.
(*) http://www.icdc.com/~roadkill/silverstein/turtle.html
2004-01-26 19:44:48 +00:00
Skip Montanaro
48f9c6dfb8
allow dump/load of gdbm files
2003-10-28 16:17:54 +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
Raymond Hettinger
c60577ea59
Generalize the last change to check for other markup spacing errors.
2003-09-08 18:43:46 +00:00
Raymond Hettinger
b9c07af46c
Check for \NULL markup errors.
2003-09-08 17:33:31 +00:00
Raymond Hettinger
e41d4c8ec9
Added doubled word warnings.
2003-08-25 04:39:55 +00:00
Tim Peters
1a3abcb648
This started opening files in text mode by default in the 2.3 release,
...
which is a disaster on Windows. Restored the binary default of all
previous releases. Also minor code cleanups.
Bugfix candidate!
2003-08-18 23:52:09 +00:00
Fred Drake
7d599482f2
When piping output into a pager like "less", quiting the pager before
...
the output was consumed would cause and exception to be raise in
logmerge; suppress this specific error, because it's not helpful.
2003-08-14 15:52:33 +00:00
Skip Montanaro
7f7e1371eb
fix for bug 773020 - splitting PATH should use os.pathsep
2003-07-17 16:45:43 +00:00
Jeremy Hylton
5ec79681d2
This file was moved to Lib/.
2003-07-07 16:09:24 +00:00
Skip Montanaro
8df717a499
minor __doc__ string tweakage
2003-06-20 01:01:19 +00:00
Skip Montanaro
c5e5e51a3a
typo
2003-06-20 01:00:20 +00:00
Walter Dörwald
fc1efa371a
Make the comment prefix 7 character long, so the lines are properly
...
aligned.
2003-06-19 10:36:17 +00:00
Guido van Rossum
ab537e92f3
Put the main script for the new IDLE here.
2003-06-13 20:34:27 +00:00
Raymond Hettinger
a33d177589
Added a command line interface for difflib.py
2003-06-08 23:04:17 +00:00
Martin v. Löwis
bb640c15a1
Patch #748849 : Update to current tools and demos.
2003-06-07 18:46:34 +00:00
Raymond Hettinger
6e0f5e077a
* Added file globbing to make it easier to check many LaTeX files.
...
* Delimiter mismatch now prints a warning instead of raising an exception.
* Offer style warnings for use of e.g. and i.e.
* Bypass false positive warnings for forward slashes in urls and in /rfc822.
* Put non-LaTex delimiter matching first to make -d option more reliable.
2003-05-16 03:06:39 +00:00
Raymond Hettinger
071b0bc9f8
Forward slash warnings now only occur for potentially valid LaTeX commands.
...
(Idea contributed by Anthony Baxter.)
2003-05-14 18:15:55 +00:00
Andrew M. Kuchling
ac6df95d07
Fix use of 'file' as a variable name.
...
(I've tested the fixes, but please proofread anyway.)
2003-05-13 18:14:25 +00:00
Andrew M. Kuchling
a2f7728341
Prevent script from allowing '-r12'
2003-05-13 17:56:07 +00:00
Andrew M. Kuchling
4693d46fef
Rename sum5.py to md5sum.py, because sum5.py is more interesting
...
as an example program
2003-05-13 17:39:26 +00:00
Andrew M. Kuchling
fb9653a63f
Don't use 'file' as a variable name
...
Modernize the code a bit
Add docstring
2003-05-13 17:38:05 +00:00
Andrew M. Kuchling
87ddce1bf0
[Bug #724767 ] Avoid use of 'file' as a variable name
2003-05-13 17:09:01 +00:00
Andrew M. Kuchling
47172b4fab
[Bug #724767 ] crlf.py uses the variable name file, which it shouldn't anymore.
2003-05-13 14:51:39 +00:00
Raymond Hettinger
62aa994633
* Added separate checks for matching braces.
...
* Added more LaTex cmds from the docs.
* Blocked forward-slash warnings with delimiters-only option.
* Put help message on shorter line to fit an 80 char screen.
2003-05-12 23:33:28 +00:00
Raymond Hettinger
4f0c6b2b70
Minor fixups.
2003-05-10 09:04:37 +00:00
Raymond Hettinger
0fd525fd1c
Add table level validation and made minor fix-ups.
2003-05-10 07:41:55 +00:00
Raymond Hettinger
71e0033200
Added a tool for making a rough check of LaTeX documents.
...
It checks for known commands, forward slashes, unbalanced or
mismatched delimters, and unbalanced or mismatched begin/end blocks.
2003-05-10 03:30:13 +00:00
Tim Peters
0eadaac7dc
Whitespace normalization.
2003-04-24 16:02:54 +00:00
Barry Warsaw
334df6c597
Finally added a -h option to print the module docstring and exit. ;)
2003-04-20 00:59:24 +00:00
Tim Peters
53f72d7dcd
Docstring clarifications.
2003-04-19 18:21:04 +00:00
Guido van Rossum
6869458236
Don't double-space the "??? new object ..." messages.
2003-04-18 19:51:10 +00:00
Tim Peters
8d17a90b83
Heh -- I checked in an old version of this, at a time I documented the
...
internal read() as being a generator but hadn't yet changed it into one.
2003-04-18 01:02:37 +00:00
Tim Peters
21d7d4d5ca
_Py_PrintReferenceAddresses(): also print the type name. In real use
...
I'm finding some pretty baffling output, like reprs consisting entirely
of three left parens. At least this will let us know what type the object
is (it's not str -- there's no quote character in the repr).
New tool combinerefs.py, to combine the two output blocks produced via
PYTHONDUMPREFS.
2003-04-18 00:45:59 +00:00
Guido van Rossum
21123ab7e5
Various improvements to the way the table is formatted, to deal with
...
exceptionally large totals etc.
2003-04-09 19:10:46 +00:00
Skip Montanaro
f2f174f655
install timeit.py as a command line script
2003-04-08 19:50:02 +00:00
Skip Montanaro
ea7598e6f4
fix name of db2pickle
2003-03-07 00:47:40 +00:00
Andrew M. Kuchling
d683504b85
Use new name for GetoptError, and pass it two arguments
...
Use re module instead of regex
2003-02-06 19:55:35 +00:00
Skip Montanaro
da72d9376b
try to avoid gross incompatibilities with older versions of Python
2003-02-03 15:29:34 +00:00
Skip Montanaro
7c1274d8ab
try to avoid gross incompatibilities with earlier versions of Python
2003-02-03 15:28:23 +00:00
Skip Montanaro
9445ce57f1
note db2pickle.py and pickle2db.py
2003-02-03 15:09:32 +00:00
Skip Montanaro
d96832914a
dump database files to pickle format
2003-02-03 15:09:03 +00:00
Skip Montanaro
9db49c849c
convert pickles generated by db2pickle.py back to database files
2003-02-03 15:08:42 +00:00
Skip Montanaro
c064a1d7e3
add missing "summary" from long options list
2003-02-03 06:34:22 +00:00
Walter Dörwald
771bc377f8
Fix comment typo.
2003-02-02 23:39:45 +00:00
Guido van Rossum
8b7b345328
Use regular expressions for branch matching, to avoid including
...
changes on a sub-branch into output for a given branch.
2003-01-07 16:46:24 +00:00
Guido van Rossum
bf1b1fdb9e
Add byext.py
2003-01-02 02:24:22 +00:00
Guido van Rossum
6a8f7b741c
Silly little script to print statistics (files, lines, words) by
...
extension. Could use some work, but already very useful.
2003-01-01 14:41:25 +00:00
Jeremy Hylton
6bf45c6752
Correct buggy module docstring.
...
Replace use of homebrew boolean with True/False.
Reflow lots more long lines.
2002-12-11 21:43:13 +00:00
Jeremy Hylton
89f1d6c04e
Fix one bug and reformat lots of code.
...
The bug is a reference to co_first_lineno that should be
co_firstlineno. The only other substantial change is to speed up
localtrace_count() by avoiding *costly* calls to inspect module.
It's trivial to get the filename and lineno directly from the frame.
Otherwise, delete commented out debug code and reflow very long lines.
2002-12-11 21:28:32 +00:00
Skip Montanaro
7bc2e1dad7
add logmerge.py (pydoc is already installed)
2002-12-05 21:12:34 +00:00
Skip Montanaro
da760c488f
simple setup.py to install some interesting scripts in $(prefix)/bin.
2002-12-05 02:58:36 +00:00
Skip Montanaro
a5f8c42268
* when given, port should be converted to int
...
* when connecting, if the port is non-standard, display it as well
2002-12-05 02:43:14 +00:00
Skip Montanaro
7dfb02d09a
allow optional port specified as part of the hostname, e.g.,
...
"www.zope.org:8021".
2002-12-05 02:37:23 +00:00
Martin v. Löwis
dab3bc05f3
Expand negative hexadecimal constants.
2002-11-23 12:08:10 +00:00
Martin v. Löwis
6f00a7ad84
Patch #542562 , file 25252: Remove changelog.
2002-11-22 09:10:33 +00:00
Guido van Rossum
affa6b7bf1
Tim wins a bet. Don't use re.
2002-11-13 21:04:31 +00:00
Guido van Rossum
bc01c3248d
Added -b tag option to limit output to a specific branch only.
...
Use -b HEAD to limit output to the trunk (skip all branch revisions).
2002-09-29 04:37:36 +00:00
Walter Dörwald
aaab30e00c
Apply diff2.txt from SF patch http://www.python.org/sf/572113
...
(with one small bugfix in bgen/bgen/scantools.py)
This replaces string module functions with string methods
for the stuff in the Tools directory. Several uses of
string.letters etc. are still remaining.
2002-09-11 20:36:02 +00:00
Michael W. Hudson
dd32a91cc0
This is my patch
...
[ 587993 ] SET_LINENO killer
Remove SET_LINENO. Tracing is now supported by inspecting co_lnotab.
Many sundry changes to document and adapt to this change.
2002-08-15 14:59:02 +00:00
Guido van Rossum
7ec34b556c
A tool to transform gprof(1) output into HTML, so you can click on a
...
function name and go to the corresponding entry.
2002-08-09 20:07:34 +00:00
Skip Montanaro
3a48ed9481
* runctx - fix a couple typos
...
* globaltrace_lt - handle case where inspect.getmodulename doesn't return
anything useful
* localtrace_trace - handle case where inspect.getframeinfo doesn't return
any context info
I think both of the last two are caused by exec'd or eval'd code
2002-07-25 16:09:35 +00:00
Fred Drake
ae39ddd628
Mechanically translated string method calls to string methods.
...
Instead of splitting a string and looping over it to call s.split(),
use list comprehensions for readability.
2002-06-18 15:37:05 +00:00
Fred Drake
ef5864ed71
SF patch #552837 , submitted by Robert Pyron:
...
1. BUGFIX: In function makefile(), strip blanks from the nodename.
This is necesary to match the behavior of parser.makeref() and
parser.do_node().
2. BUGFIX fixed KeyError in end_ifset (well, I may have just made
it go away, rather than fix it)
3. BUGFIX allow @menu and menu items inside @ifset or @ifclear
4. Support added for:
@uref URL reference
@image image file reference (see note below)
@multitable output an HTML table
@vtable
5. Partial support for accents, to match MAKEINFO output
6. I added a new command-line option, '-H basename', to specify
HTML Help output. This will cause three files to be created
in the current directory:
`basename`.hhp HTML Help Workshop project file
`basename`.hhc Contents file for the project
`basename`.hhk Index file for the project
When fed into HTML Help Workshop, the resulting file will be
named `basename`.chm.
7. A new class, HTMLHelp, to accomplish item 6.
8. Various calls to HTMLHelp functions.
A NOTE ON IMAGES: Just as 'outputdirectory' must exist before
running this program, all referenced images must already exist
in outputdirectory.
FLD: wrapped some long lines.
2002-06-18 15:21:21 +00:00
Martin v. Löwis
f90ae20354
Patch #488073 : AtheOS port.
2002-06-11 06:22:31 +00:00
Skip Montanaro
8c5763f3ea
moving into the Doc/tools directory
2002-04-30 16:23:42 +00:00
Andrew M. Kuchling
a90a3b471d
Use md5.new() constructor
2002-04-17 21:53:21 +00:00
Andrew M. Kuchling
343cbd0279
Use 2.1's .hexdigest() method
2002-04-17 21:50:03 +00:00
Skip Montanaro
557fe7541d
new script - helps track down symbols exported by modules but not
...
mentioned in the library reference manual
2002-03-28 22:01:40 +00:00
Skip Montanaro
9a29e7aba3
operate as a filter when no files or directories appear on the command line
2002-03-26 11:39:26 +00:00
Tim Peters
54e5b89d77
SF bug #497839 : reindent chokes on empty first lines.
...
Reindenter.run(): copy over initial all-whitespace lines (if any, and
after normalizing to remove trailing blanks and tabs).
Bugfix candidate.
2002-02-17 07:03:05 +00:00
Barry Warsaw
56ab9214c9
Added a module docstring, which doubles as the --help text.
...
Added a bunch of command line options to make the script more
generic.
2002-02-08 23:25:46 +00:00
Guido van Rossum
65f50156cd
www.google.com is better than google.com.
2002-02-08 16:20:07 +00:00
Guido van Rossum
436fd75b4a
Warning message about unfound file was missing trailing \n.
2001-12-06 03:28:17 +00:00
Guido van Rossum
e51c3f5ecb
SF patch #489680 (David Abrahams): h2py uses nonexistent method splitfields()
2001-12-06 03:24:30 +00:00
Guido van Rossum
d3d8a1df5c
A tiny but useful script that fires off a search on Google.
...
(Not sure if this is legal according to the Google terms of service. :-)
2001-12-04 15:23:47 +00:00
Guido van Rossum
a30eacf458
Checking in Zooko's version per SF patch #476866 , plus my changes to
...
the usage docs: (a) align properly, (b) explain properly.
2001-11-28 19:41:45 +00:00
Jeremy Hylton
eaa6e3c712
Replace all instances of err.strerror with err.
...
The strerror attribute contained only partial information about the
exception and produced some very confusing error messages. By passing
err (the exception object itself) and letting it convert itself to a
string, the error messages are better.
2001-10-08 20:33:20 +00:00
Tim Peters
ba001a0b67
Changed the reindenter to strip only trailing spaces and tabs from lines,
...
not other control characters string.rstrip() got rid of. This caters to
the \f thingies Barry likes putting in Python source files.
2001-10-04 19:44:10 +00:00
Tim Peters
2c9aa5ea8d
Generalize file.writelines() to allow iterable objects.
2001-09-23 04:06:05 +00:00
Tim Peters
42b6877293
Fix restore (difflib.restore() became a generator too).
2001-09-22 21:59:18 +00:00
Tim Peters
8a9c284437
Make difflib.ndiff() and difflib.Differ.compare() generators. This
...
restores the 2.1 ability of Tools/scripts/ndiff.py to start producing
output before the entire comparison is complete.
2001-09-22 21:30:22 +00:00
Guido van Rossum
a0ca3d611e
- Reverse the meaning of the -m option: warnings about multiple /
...
operators per line or statement are now on by default, and -m turns
these warnings off.
- Change the way multiple / operators are reported; a regular
recommendation is always emitted after the warning.
- Report ambiguous warnings (both int|long and float|complex used for
the same operator).
- Update the doc string again to clarify all this and describe the
possible messages more precisely.
2001-09-04 16:22:01 +00:00
Tim Peters
83e7ccc9fd
Whitespace normalization.
2001-09-04 06:37:28 +00:00
Guido van Rossum
1832de4bc0
PEP 238 documented -Qwarn as warning only for classic int or long
...
division, and this makes sense. Add -Qwarnall to warn for all
classic divisions, as required by the fixdiv.py tool.
2001-09-04 03:51:09 +00:00
Guido van Rossum
61c345fa37
Rename the -D option to -Q, to avoid a Jython option name conflict.
2001-09-04 03:26:15 +00:00
Guido van Rossum
e7a95983b0
Implement what the docstring said: multiple slashes per line are
...
treated the same as single ones by default. Added -m option to issue
a warning for this case instead.
2001-09-02 14:11:30 +00:00
Guido van Rossum
13c51ecb8c
Added more text to the docstring, updated the way the exit status is
...
percolated out, and some general cleanup. The output is still the
same, except it now prints "Index: <file>" instead of "Processing:
<file>", so that the output can be used as input for patch (but only
the diff-style parts of it).
2001-09-02 04:49:36 +00:00
Guido van Rossum
43db62e263
A grep-like tool that looks for division operators.
2001-09-02 04:43:30 +00:00
Guido van Rossum
822218b400
The beginnings of a script to help finding / operators that may need
...
to be change to //. The code is pretty gross so far, and I promise
I'll work on this more, but I have to go eat now! :-)
2001-09-01 21:55:58 +00:00
Tim Peters
ebb7133f4f
Fix typo in module docstring.
2001-08-15 06:07:42 +00:00
Tim Peters
3055ad234a
+ A msg on c.l.py reminded me that docstrings can be implicitly catenated.
...
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.
2001-08-13 05:33:53 +00:00
Tim Peters
5e824c37d3
SF patch #445412 extract ndiff functionality to difflib, from
...
David Goodger.
2001-08-12 22:25:01 +00:00
Tim Peters
b704238a6c
Tool to delete (or just rewrite parts of) obsolete future statements.
2001-08-12 08:41:13 +00:00
Martin v. Löwis
f2f8c51ae6
When representing #includes as imports, do from MOD import *.
2001-08-09 12:32:10 +00:00
Martin v. Löwis
4f85bf3311
Patch #437683 : Use re instead of regex.
...
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.
2001-08-09 12:24:38 +00:00
Tim Peters
45e5e72eb8
Rename pydoc.pyw to pydocgui.pyw: Since we changed Python to allow .pyw
...
files to satisfy imports, pydoc.pyw was just importing itself!
2001-08-05 05:43:20 +00:00
Fred Drake
79e75e1916
Use string.ascii_letters instead of string.letters (SF bug #226706 ).
2001-07-20 19:05:50 +00:00
Guido van Rossum
9966e2c663
This is a trivial command line utility to print MD5 checksums.
...
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.
2001-06-22 16:05:48 +00:00
Martin v. Löwis
a4debfffc9
Patch #430754 : Makes ftpmirror.py .netrc aware
2001-06-07 17:17:00 +00:00
Marc-André Lemburg
716cf91839
Moved the encoding map building logic from the individual mapping
...
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.
2001-05-16 09:41:45 +00:00
Jeremy Hylton
66a7e57c7e
Fix several bugs and add two features.
...
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)
2001-05-08 04:20:52 +00:00
Guido van Rossum
f9e56e117f
Append the revision number for each file to the output.
...
(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.)
2001-04-10 03:31:27 +00:00
Ka-Ping Yee
fde8a86a4e
Script for starting pydoc with a GUI in Windows.
2001-03-23 14:10:39 +00:00
Ka-Ping Yee
895e8925d6
Call main routine in pydoc module (pydoc.cli).
2001-03-01 00:25:40 +00:00
Andrew M. Kuchling
b68ef5081d
Add script form of pydoc so that it's present in beta1. Currently
...
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.
2001-02-28 20:55:10 +00:00
Tim Peters
9ae2148ada
Moved SequenceMatcher from ndiff into new std library module difflib.py.
...
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: ----------------------------------------------------------------------
2001-02-10 08:00:53 +00:00
Tim Peters
79b334ba55
Hand repair of cases where reindent changed lines of the form
...
\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.
2001-01-17 09:13:33 +00:00
Tim Peters
70c4378dbc
Whitespace normalization.
2001-01-17 08:48:39 +00:00
Marc-André Lemburg
a866df806d
This patch changes the default behaviour of the builtin charmap
...
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 .
2001-01-03 21:29:14 +00:00
Tim Peters
2f1aeb950d
SF bug 124051: ndiff "?" lines can be confusing. Well, they still can, but
...
after implementing it I liked Gregor's two-"?" line idea a lot.
2000-12-09 05:03:22 +00:00
Tim Peters
0d430e28c0
Hack ndiff to display lines w/ leading tabs more intuitively. This synchs
...
ndiff w/ a custom version I made for Guido during the pre-2.0 freeze.
2000-11-01 02:51:27 +00:00
Guido van Rossum
70280b859e
I'm moving redemo.py here from Demo/tkinter/guido, since it is
...
somewhat useful to learn regular expressions, and this way it'll be
installed on Windows.
This closes bug report 115609.
2000-10-06 17:37:12 +00:00
Tim Peters
ad14720262
New tool for normalizing indentation of .py files.
2000-10-05 03:48:38 +00:00
Jeremy Hylton
0b7b4b8a22
satisfy the tabnanny
2000-09-18 01:46:01 +00:00
Barry Warsaw
64850efa39
Allow this script to act like a module by only calling main() if
...
__name__ == '__main__'. Closes SF bug #110844 .
2000-09-16 22:09:51 +00:00
Guido van Rossum
8586991099
REMOVED all CWI, CNRI and BeOpen copyright markings.
...
This should match the situation in the 1.6b1 tree.
2000-09-01 23:29:29 +00:00
Guido van Rossum
1688f378cb
Rob Hooft, Moshe Zadka: converted to 4 space indents and re instead of regex.
2000-09-01 13:41:37 +00:00
Jeremy Hylton
da1ec468b1
Python code coverage tool by Skip Montanaro and Andrew Dalke
2000-08-03 19:26:21 +00:00
Peter Schneider-Kamp
7f589fddad
add expandtabs command (-e)
...
change eliminate to delete (-d)
2000-07-11 16:43:16 +00:00
Guido van Rossum
fd71b9e9d4
Change copyright notice.
2000-06-30 23:50:40 +00:00
Guido van Rossum
a04ff0fb53
Running the program through itself reveals that one end tag was
...
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!)
2000-06-28 22:55:20 +00:00
Guido van Rossum
59811b189d
Peter Schneider-Kamp:
...
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
2000-06-28 22:47:22 +00:00
Fred Drake
bae57a88a6
Of course, I forget how to type long ago...
...
Typo noted by /F.
2000-03-17 16:56:23 +00:00
Fred Drake
1966004986
"write marshalled" --> "writes marshalled" (in docstring); noted by
...
Detlef Lannert <lannert@lannert.rz.uni-duesseldorf.de>.
2000-03-17 15:43:37 +00:00
Guido van Rossum
34a79115c5
Marc-Andre Lemburg: added
...
gencodec.py - Create Python codecs from Unicode mapping files
2000-03-10 22:36:57 +00:00
Guido van Rossum
1b6d21bb3e
Correct type error in getopt.error handling code.
2000-02-29 13:08:44 +00:00
Guido van Rossum
aacf5ce1ad
Script by Tim Peters to discover illegal append() calls.
2000-02-29 13:05:49 +00:00
Guido van Rossum
67dd17f730
Fix multi-arg append().
2000-02-29 13:00:16 +00:00
Guido van Rossum
6e0a28f6cf
Deleting tabpolice.py; it was superceded by tabnanny.py long ago.
2000-02-23 15:34:43 +00:00
Guido van Rossum
a02c898e69
Moved tabnanny.py to standard library status.
2000-02-23 15:33:52 +00:00
Guido van Rossum
967e509a81
Patch by Gerrit Holl:
...
* In crlf.py and lfcr.py: regsub -> re
2000-02-14 21:42:14 +00:00
Guido van Rossum
d962878309
Patch by Gerrit Holl:
...
* In logmerge.py: added '-r' flag to show the oldest checkin
first instead of the newest, and getopt.getopt was used
wrong.
2000-02-14 21:41:50 +00:00
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
Guido van Rossum
939e4c1efb
Oops, there was a bug in the output formatting - the last printed
...
values would overwrite the next value.
1997-08-14 23:25:20 +00:00
Guido van Rossum
3485bb6f44
Added logmerge.py
1997-08-14 22:04:26 +00:00
Guido van Rossum
6f0cf7ee20
Consolidate a bunch of CVS or RCS logs read from stdin.
1997-08-14 22:04:00 +00:00
Guido van Rossum
4d3376a80f
Added cvsfiles.py and treesync.py
1997-08-14 20:16:32 +00:00
Guido van Rossum
a554107802
Source tree synchronization tool (for Windowes, mostly)
1997-08-14 20:15:20 +00:00
Guido van Rossum
30e53c0c39
Print a list of files under CVS.
1997-08-14 20:14:54 +00:00
Guido van Rossum
9189bdabd5
support C++ comments
1997-08-14 20:14:29 +00:00
Guido van Rossum
5526e394a2
set LOOPS to 10000
1997-08-14 20:14:12 +00:00
Guido van Rossum
650b3aad55
Unlink before rename (for NT).
1997-05-19 15:20:49 +00:00
Guido van Rossum
e6fcd33179
Correct comment; -c is off by default.
1997-05-15 21:51:16 +00:00
Guido van Rossum
1ade44cb0c
Open the output files with 'wb', not 'w'.
1997-05-15 18:25:29 +00:00
Guido van Rossum
04f2b453bb
Version 1.1. Fix memory leak and expensive comparison with None.
1997-01-18 02:20:37 +00:00
Guido van Rossum
f06ee5fa07
/usr/local/bin/python -> /usr/bin/env python
1996-11-27 19:52:01 +00:00
Guido van Rossum
499181a833
Changed so that it replaces /usr/local/bin/python with /usr/bin/env python.
1996-11-27 19:43:49 +00:00
Guido van Rossum
d5c58c34db
Changed logic so it now replaces anything that has #! and python in
...
the first line, replacing the entire line.
1996-11-27 19:43:01 +00:00
Guido van Rossum
fc0588241c
Script to fix cprt notice
1996-11-27 19:41:55 +00:00
Guido van Rossum
e41d00bb6a
Fixed a bug: files that no longer exist remotely would never be
...
removed from .mirrorinfo. Now they are (even if -r is not specified
-- the files are not removed, just their .mirrorinfo entry).
Added a feature: the -s pattern option is also used to skip local
files when removing (i.e. -r won't remove local files matching the -s
patterns).
1996-11-14 18:24:47 +00:00
Fred Drake
abcb38250b
(texi2html.py): Minor improvement to HTML 3.0 output for code examples.
1996-10-25 22:13:59 +00:00
Fred Drake
22f7f9e671
(texi2html.py): Added CLASS=Navigation attribute to DIV around top/bottom
...
navigation links for HTML 3 version.
Forced a blank line above the footnotes separator for HTML 2; at
least one page did not get this spaced correctly.
1996-10-11 16:54:00 +00:00
Fred Drake
0282726643
(texi2html.py): Tightened the generated HTML slightly. Added -p option to
...
print section titles even when the debugging output is not enabled.
Added -3 option to generate HTML 3.0 constructs where meaningful.
Removed repititive garbage generation: the old version added simple
descriptive comments after every datadesc/funcdesc/*desc entry:
function(args) -- function of module xxxx
Description....
These comments are no longer generated:
function(args)
Description....
1996-10-09 19:05:12 +00:00
Fred Drake
a39a25e5ec
(texi2html.py): Use "if __name__ == '__main__':" test. Adjust indentation
...
to 4 spaces per level (no longer 8).
(Makefile): Use .pyc versions of partparse.py and texi2html.py to generate
converted documentation formats. This reduces the startup costs;
probably doesn't affect anyone but me in reality, but helps when
working on the docs.
1996-09-13 14:44:34 +00:00
Guido van Rossum
be5e34204e
Note obsolescence
1996-09-11 23:34:32 +00:00
Guido van Rossum
6100d914e8
Allow whitespace before '#' in preprocessor directives.
1996-08-22 23:12:23 +00:00
Guido van Rossum
29901ff528
Some improvements by Fred Drake.
1996-08-09 21:46:34 +00:00
Guido van Rossum
8e7a54f525
More changes by Sjoerd & Jack
1996-07-21 02:50:30 +00:00
Guido van Rossum
9a2c546e75
Create files as temp file and move to real location only when complete.
...
Added some try-except statements around listdir and mkdir operations.
1996-04-09 02:51:23 +00:00
Guido van Rossum
d2966cb95a
don't die on unreadable files etc.
1996-02-05 18:49:00 +00:00
Jack Jansen
e48aa966c1
Fixed bug in cts error message handling.
1995-11-10 14:56:16 +00:00
Jack Jansen
81299f10f7
Added providence mailer support
1995-10-30 10:23:10 +00:00
Jack Jansen
4ec940ad04
Added (limited) compuserve error parsing
1995-10-30 10:10:19 +00:00
Sjoerd Mullender
8968624574
Script to read and parse error messages from mailer daemons.
...
Written by Jack, some minor changes by Sjoerd.
1995-10-19 09:35:31 +00:00
Sjoerd Mullender
edb21c4edc
Fixed typo: == -> =.
1995-08-29 14:22:16 +00:00
Guido van Rossum
06f4289d3f
many fixes by anonymous contributor
1995-08-28 03:01:00 +00:00
Guido van Rossum
e830e55606
added ftp mirror script
1995-06-20 19:31:37 +00:00
Guido van Rossum
a12bbff857
mods by Gregor Schmid -- very nice!
1995-05-03 14:17:36 +00:00
Guido van Rossum
189f8fb8f7
added "pystone" benchmark
1995-03-30 09:42:43 +00:00
Guido van Rossum
26a9d37e5c
new, from ../Demo/www
1995-03-15 11:26:05 +00:00
Guido van Rossum
ed3c791050
moved lots of scripts from Demo/scripts to Tools/scripts
1995-03-02 15:56:30 +00:00
Guido van Rossum
514d351d45
use $INCLUDE path (Mark Hammond)
1995-01-17 17:01:40 +00:00
Guido van Rossum
07c9645413
Get rid of freeze (now its own directory).
...
Added some new demos. Fixed a few others.
1994-10-03 16:45:35 +00:00
Guido van Rossum
9af22a037f
newslist.py: Added search for .newslistrc.py;
...
pindent.py: use /usr/local/bin/python;
pathfix.py: new script to fix #! lines in a group of scripts.
1994-08-19 15:02:57 +00:00
Guido van Rossum
0038cd9e4d
Added convenience functions {complete,reformat}_{filter,string,file}.
...
Added usage message to test program.
1994-06-07 22:19:41 +00:00
Guido van Rossum
3962fdb25a
correct typos in option parsing loop
1994-05-27 14:13:46 +00:00
Guido van Rossum
01f5f62401
Added -i option to ignore general regexps
1994-05-17 09:05:54 +00:00
Guido van Rossum
1d28e1707a
Initial revision
1994-05-15 18:14:33 +00:00
Guido van Rossum
7faf67caf5
Initial revision
1994-05-09 14:52:41 +00:00
Guido van Rossum
09336f9f73
Process command line arguments; skip #defines that generate invalid
...
Python
1994-05-03 14:37:30 +00:00
Guido van Rossum
5ec8b525d2
Restructured main, use getopt, use regular expression search instead
...
of prefix match
1994-01-21 15:47:00 +00:00
Guido van Rossum
0b7dfbb9b7
Initial revision
1994-01-07 11:43:11 +00:00
Guido van Rossum
a635b9a6ff
remove references to /ufs/guido/bin/sgi/python
1994-01-07 11:43:11 +00:00
Guido van Rossum
f62f687453
Various changes, andded -c option
1994-01-07 10:55:15 +00:00
Guido van Rossum
aa895c752b
Initial revision
1993-06-10 14:43:53 +00:00
Guido van Rossum
09abc8e7df
Ignore ,v files too
1993-06-05 18:03:30 +00:00
Guido van Rossum
41ffccbba7
*** empty log message ***
1993-04-01 20:50:35 +00:00
Guido van Rossum
d5c57e1624
Microfixes
1993-04-01 20:46:40 +00:00
Guido van Rossum
cf5dd9cbfd
Fix bug when reporting error
1992-12-10 00:01:24 +00:00
Guido van Rossum
15f27fb6ea
Adapt to modern times...
1992-12-10 00:00:58 +00:00
Guido van Rossum
1d9741742e
Initial revision
1992-12-09 23:14:40 +00:00
Guido van Rossum
d3592486ce
Friendlier response to interrupt. Use /usr/local/*bin*/python.
1992-12-09 23:12:59 +00:00
Guido van Rossum
0cb8e8cfc0
Add .fdc and .rgb to default list of ignored extensions
1992-10-02 14:19:57 +00:00
Guido van Rossum
61700bb985
cope with filenames containing spaces
1992-08-31 10:54:54 +00:00
Guido van Rossum
0cc19450e2
Use regex instead of regexp
1992-08-31 10:54:06 +00:00
Guido van Rossum
f2e1cfb8f3
Use regex and don't use path
1992-08-31 10:53:53 +00:00
Guido van Rossum
047979e3d5
Fix regexp recognizing comments to cope with unterminated comments.
1992-06-05 15:13:53 +00:00
Guido van Rossum
61cfd96003
Added two #! lines
1992-05-19 13:50:10 +00:00
Guido van Rossum
ceb86daa16
Change the way ignore is assigned to
1992-05-19 13:49:16 +00:00
Guido van Rossum
4a5ab81bc9
posix -> os
1992-03-30 11:31:39 +00:00
Guido van Rossum
9a6757dade
posix -> os
1992-03-30 11:15:26 +00:00
Guido van Rossum
391b8b7dee
change posix/path to os
1992-03-30 11:14:36 +00:00
Guido van Rossum
e7b88e7402
change posix to os
1992-03-30 11:13:59 +00:00
Guido van Rossum
b2ac8092a8
change posix to os and path to os.path
1992-03-30 11:12:23 +00:00
Guido van Rossum
2ba9f30489
Initial revision
1992-03-02 16:20:32 +00:00
Guido van Rossum
fcd1e6ed4d
Added '-l[flags]' option.
1992-03-02 16:17:31 +00:00
Guido van Rossum
bff5bb3db9
Use fnmatch; read ".xxcign" for additional patterns to ignore.
1992-03-02 16:13:27 +00:00
Guido van Rossum
bdfcfccbe5
New == syntax
1992-01-01 19:35:13 +00:00
Guido van Rossum
0a60ee1c69
Cosmetic change.
1992-01-01 19:22:09 +00:00
Guido van Rossum
11e7f62dbc
Use new, more generic structure for *fix.py scripts.
1992-01-01 18:38:09 +00:00
Guido van Rossum
9f39fbb5b7
Adapt the regular expression to the new class syntax.
1991-12-30 23:01:28 +00:00
Guido van Rossum
7e73fd0024
Fix bogus mode mask.
1991-12-26 13:23:22 +00:00
Guido van Rossum
2c4d7e742c
Initial revision
1991-12-26 12:58:17 +00:00
Guido van Rossum
97dddba1bb
Better check to avoid executables.
1991-12-18 13:39:16 +00:00
Guido van Rossum
5378d5c485
Initial revision
1991-12-18 13:38:27 +00:00
Guido van Rossum
2fa5a7fc00
Use posix.popen to read output from a command instead if command.get*.
1991-07-01 18:23:06 +00:00
Guido van Rossum
9c5c80824c
Renamed path.cat to path.join.
1991-07-01 18:22:34 +00:00
Guido van Rossum
bcf5012887
Add options -amc; do lstat if possible; columnize properly.
1991-07-01 18:20:35 +00:00
Guido van Rossum
185d06ea91
Added to list of bad filenames.
1991-06-04 20:44:11 +00:00
Guido van Rossum
ec758ead39
Initial revision
1991-06-04 20:36:54 +00:00