Jeremy Hylton
566d934745
compiler.transformer: correct lineno attribute when possible
...
SF patch #1015989
The basic idea of this patch is to compute lineno attributes for all AST nodes. The actual
implementation lead to a lot of restructing and code cleanup.
The generated AST nodes now have an optional lineno argument to constructor. Remove the
top-level asList(), since it didn't seem to serve any purpose. Add an __iter__ to ast nodes.
Use isinstance() instead of explicit type tests.
Change transformer to use the new lineno attribute, which replaces three lines of code with one.
Use universal newlines so that we can get rid of special-case code for line endings. Use
lookup_node() in a few more frequently called, but simple com_xxx methods(). Change string
exception to class exception.
2004-09-07 15:28:01 +00:00
Martin v. Löwis
7d3755d2c0
Add test_difflib_expect.html.
...
Fix open Verbs.
Properly add "Edit with IDLE" to TclTk feature.
2004-09-06 06:31:12 +00:00
Martin v. Löwis
e0f780d581
Conditionalize Tcl feature
2004-09-01 14:51:06 +00:00
Martin v. Löwis
d3f61a2de6
Pickup Tk from tcltk directory.
2004-08-30 09:22:30 +00:00
Martin v. Löwis
e064b41f5a
Patch #914575 : difflib side by side diff support, diff.py s/b/s HTML option.
2004-08-29 16:34:40 +00:00
Tim Peters
66cb018c96
Whitespace normalization.
2004-08-26 05:23:19 +00:00
Skip Montanaro
8107ca47eb
Keep option parser from gobbling up the filename to be profiled and the
...
flags it accepts. It's too late to change optparse's default behavior now,
but I find the default setting of allow_interspersed_args very weird.
2004-08-24 14:26:43 +00:00
Tim Peters
94607dd5ce
Whitespace normalization.
2004-08-22 19:42:56 +00:00
Martin v. Löwis
2dd2a28802
Add acknowledgements to ExitDialog.
2004-08-22 17:10:12 +00:00
Martin v. Löwis
8ffe9abd09
Move msi from sandbox to Tools.
2004-08-22 13:34:34 +00:00
Matthias Klose
2443d4ab5d
- pygettext.py: Generate POT-Creation-Date header in ISO format.
2004-08-16 12:10:12 +00:00
Tim Peters
494aaee902
Whitespace normalization.
2004-08-09 18:54:11 +00:00
Andrew M. Kuchling
e236b38731
[Patch #1005491 ] use __name__ == '__main__' in scripts
2004-08-09 17:27:55 +00:00
Michael W. Hudson
e6e77e5fe7
Fix
...
[ 777659 ] Uninitialized variable used in Tools/faqwiz/faqwiz.py
with help from jlgijsbers on #python-dev IRC.
2004-08-07 21:13:46 +00:00
Hye-Shik Chang
e9ddfbb412
SF #989185 : Drop unicode.iswide() and unicode.width() and add
...
unicodedata.east_asian_width(). You can still implement your own
simple width() function using it like this:
def width(u):
w = 0
for c in unicodedata.normalize('NFC', u):
cwidth = unicodedata.east_asian_width(c)
if cwidth in ('W', 'F'): w += 2
else: w += 1
return w
2004-08-04 07:38:35 +00:00
Anthony Baxter
c2a5a63654
PEP-0318, @decorator-style. In Guido's words:
...
"@ seems the syntax that everybody can hate equally"
Implementation by Mark Russell, from SF #979728 .
2004-08-02 06:10:11 +00:00
Marc-André Lemburg
5ae638c78e
Remove copyright notices from gencodec.py output.
...
The script was originally used to create the initial set of
codecs (and these were (c) CNRI). While the script itself still
is (c) CNRI, the output certainly isn't anymore.
2004-07-23 10:09:57 +00:00
Tim Peters
182b5aca27
Whitespace normalization, via reindent.py.
2004-07-18 06:16:08 +00:00
Tim Peters
4fba4521e8
WTF is with this script? It contained illegal syntax and illegal
...
indentation -- it could never have been run, under any version of Python.
2004-07-18 05:31:31 +00:00
Jack Jansen
c572e42fb4
Call the correct tp_dealloc.
2004-07-15 21:24:07 +00:00
Raymond Hettinger
7b7acd1de5
Use set() instead of sets.Set()
2004-07-12 13:29:10 +00:00
Raymond Hettinger
5492f3d977
Add more known macros.
2004-07-12 13:16:49 +00:00
Tim Peters
27f883687b
Whitespace normalization.
2004-07-08 04:22:35 +00:00
Hye-Shik Chang
974ed7cfa5
- SF #962502 : Add two more methods for unicode type; width() and
...
iswide() for east asian width manipulation. (Inspired by David
Goodger, Reviewed by Martin v. Loewis)
- Move _PyUnicode_TypeRecord.flags to the end of the struct so that
no padding is added for UCS-4 builds. (Suggested by Martin v. Loewis)
2004-06-02 16:49:17 +00:00
Armin Rigo
ba91b9fdda
Applying SF patch #949329 on behalf of Raymond Hettinger.
2004-05-19 19:10:18 +00:00
Raymond Hettinger
354433a59d
SF patch #872326 : Generator expression implementation
...
(Code contributed by Jiwon Seo.)
The documentation portion of the patch is being re-worked and will be
checked-in soon. Likewise, PEP 289 will be updated to reflect Guido's
rationale for the design decisions on binding behavior (as described in
in his patch comments and in discussions on python-dev).
The test file, test_genexps.py, is written in doctest format and is
meant to exercise all aspects of the the patch. Further additions are
welcome from everyone. Please stress test this new feature as much as
possible before the alpha release.
2004-05-19 08:20:33 +00:00
Gustavo Niemeyer
ffa5a5015a
Small fixes in freeze.py.
2004-05-08 17:59:43 +00:00
Skip Montanaro
26510d42b0
delete timing output - it appears after the </html> line.
2004-04-16 03:12:12 +00:00
Skip Montanaro
165163f245
add usage() function, -h(elp) flag and long versions of short flags
2004-03-27 18:43:56 +00:00
Andrew M. Kuchling
a982c44543
[Patch #918212 ] Support XHTML's 'id' attribute, which can be on any element.
2004-03-21 19:07:23 +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
Jack Jansen
7107c1aff3
Got rid of macglue.h, replacing it by pymactoolbox.h where relevant.
...
Cleaned up various things in the toolbox modules.
2003-11-20 13:31:00 +00:00
Skip Montanaro
48f9c6dfb8
allow dump/load of gdbm files
2003-10-28 16:17:54 +00:00
Martin v. Löwis
23b44a39ce
Patch #812378 : Normalize white space.
2003-10-24 20:09:23 +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
Martin v. Löwis
8f81c93b8c
Patch #713645 : Fix typo.
2003-09-20 11:05:01 +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
Barry Warsaw
eb296d967b
Fix for SF bug #780996 , crash when no .pynche file exists and -d
...
option is not given. If dbfile isn't given and can't be retrieved
from the optionsdb, just initialize it to the first element in
RGB_TXT.
Backport candidate.
2003-09-03 03:15:50 +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
Neal Norwitz
592c4cc460
SF bug 753592, websucker bug
...
Pass the proper variable when the user supplies a directory.
Will backport.
2003-07-01 04:14:28 +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
ecb544e95b
Get rid of old IDLE. Lib/idlelib rules!
2003-06-14 00:08:37 +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
Gustavo Niemeyer
7b4abbb2e2
modulefinder.py is not a freeze private module anymore.
2003-05-26 23:52:30 +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
Martin v. Löwis
8f0bd5657a
Declare encoding. Use unsigned long constants. Fixes #728277 .
2003-05-09 08:59:17 +00:00
Guido van Rossum
a3c253e83b
Removing new files accidentally checked in on the trunk rather than on the
...
idlefork-merge-branch.
2003-04-29 11:27:16 +00:00
Guido van Rossum
767d9fedc7
Add back files that were accidentally deleted on the trunk rather than
...
on the idlefork-merge-branch as intended.
2003-04-29 11:15:38 +00:00
Guido van Rossum
57cd21fde2
Checking in IDLEFORK exactly as it appears in the idlefork CVS.
...
On a branch, for now.
2003-04-29 10:23:27 +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
Martin v. Löwis
2548c730c1
Implement IDNA (Internationalized Domain Names in Applications).
2003-04-18 10:39:54 +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
Barry Warsaw
e04ee70a68
Mostly reformatting, splitting long lines, whitespace normalization
...
etc.
Fixed one typo in the __main__ section.
2003-04-16 18:08:23 +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
Just van Rossum
821a0fc140
replace obsolete 'exceptions' implicit by 'warnings'
2003-03-18 18:48:17 +00:00
Just van Rossum
e9e20a9838
[ 684677 ] Allow freeze to exclude implicits
2003-03-08 19:50:38 +00:00
Skip Montanaro
ea7598e6f4
fix name of db2pickle
2003-03-07 00:47:40 +00:00
Mark Hammond
ce56c377a0
When bad HTML is encountered, ignore the page rather than failing with
...
a traceback.
2003-02-27 06:59:10 +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
Jack Jansen
c9713874ba
Updated the doc strings to refer to PyArg_Parse and Py_BuildValue in stead
...
of getargs() and mkvalue().
2003-01-24 09:23:13 +00:00
Raymond Hettinger
96bf0d75e2
Kurt pointed out another method affected by the changes to pyclbr.py.
2003-01-22 13:29:00 +00:00
Jack Jansen
2cf08ab4c2
Sigh, due to sloppiness on my part bgen has become pretty mixed up wrt. tabs
...
and spaces. Detabbed the lot.
2003-01-19 21:53:57 +00:00
Raymond Hettinger
18acea7c8e
SF bug #668906 : class browser raises AttributeError
...
The Py2.3 updates to the pyclbr module return both Class and Function
objects. The IDLE ClassBrowser module only knew about Class and could
not handle objects which did not define "super".
Fixed by adding a guard.
2003-01-18 22:53:36 +00:00
Martin v. Löwis
2206cd17ce
Properly find and install icons even if calling setup.py from the build dir.
2003-01-16 11:03:33 +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