Commit Graph

1486 Commits

Author SHA1 Message Date
Guido van Rossum f90d529229 Provisional fix for writefile() [SF bug # 541730].
The problem was that an exception can occur in the text.get() call or
in the write() call, when the text buffer contains non-ASCII
characters.  This causes the previous contents of the file to be lost.

The provisional fix is to call str(self.text.get(...)) *before*
opening the file, so that if the exception occurs, we never open the
file.

Two orthogonal better solutions have to wait for policy decisions:

1. We could try to encode the data as Latin-1 or as UTF-8; but that
   would require IDLE to grow a notion of file encoding which requires
   more thought.

2. We could make backups before overwriting a file.  This requires
   more thought because it needs to be fast and cross-platform and
   configurable.
2002-04-15 00:19:12 +00:00
Martin v. Löwis dcd2dc2fff Patch #540583: Open MS Help Docs if available. 2002-04-14 10:30:51 +00:00
Jack Jansen ededa90f67 - Added support for inherent pointer types (typedefs of arrays)
- Added a debug class variable to enable parser debugging.
2002-04-12 13:21:49 +00:00
Jack Jansen da70485694 Give type name when complaining about using input-only type for output
or v.v.
2002-04-12 13:14:54 +00:00
Tim Peters bc0e910826 Convert a pile of obvious "yes/no" functions to return bool. 2002-04-04 22:55:58 +00:00
Marc-André Lemburg 64b4f2770e Updated freeze.py to the new Makefile symbol layout.
Fixed a few compiler warnings.

freeze.py now produces binaries which can import shared
modules (unlike before).
2002-04-04 16:15:41 +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
Fredrik Lundh b622a81e56 use -kb on idle/Icons/minusnode.gif ("cvs up" kept checking it out all
the time...)
2002-03-18 21:43:04 +00:00
Jack Jansen 89dbd97279 Some structures should be passed to Py_BuildValue by reference, not by value,
notably FSSpec and FSRef objects. First half of fix for #531291.

2.2.1 candidate.
2002-03-18 15:24:22 +00:00
Martin v. Löwis 73e618734d Patch #512466: Script to move faqwiz entries. 2002-03-18 08:56:23 +00:00
Andrew M. Kuchling 566c0c737f [Bug #512799] urllib.splittype() returns a 2-tuple. (Reported by seb bacon) 2002-03-08 17:19:10 +00:00
Guido van Rossum 30efbccee4 Fix by Edward K Ream to make breakpoints work on Windows: insert a
missing call to self.canonic().
2002-02-25 23:11:03 +00:00
Martin v. Löwis dc13517586 Patch #520483: Make IDLE OutputWindow handle Unicode.
2.2.1 candidate.
2002-02-23 22:39:37 +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
Tim Peters bd8ce79390 smart_backspace_event(): remove now-pointless int() call.
Bugfix candidate:  the current state of AutoIdent.py should be in 2.2.1.
2002-01-23 16:57:55 +00:00
Guido van Rossum 64e9d61a1e Properly fix SF bug #507298 (Gregor Lingl): shellpython2.2 -Qnew smart
indent error

Use // where int division is intended.  (This breaks IDLE for use with
previous Python versions -- I don't care.)
2002-01-23 15:15:13 +00:00
Tim Peters 4509168dbf classifyws(): Fix a "/" to work under -Qnew (as well as without it).
Bugfix candidate!
2002-01-23 05:02:20 +00:00
Jack Jansen dcfc20282b Added some support for Uicode arguments. Still leaves something to be desired, especially because of poor unicode support in PyArg_ParseTuple. 2002-01-01 22:40:08 +00:00
Jack Jansen f1472384dc Updated to current pathnames. 2002-01-01 22:39:07 +00:00
Jack Jansen 9aaee933da Patches by Jens B. Jorgensen with small mods by me:
- Converted the templates to use ANSI C prototypes (finally!)
- Use re in stead of deprecated regex
2001-12-27 23:35:43 +00:00
Jack Jansen 6f4f8c7fe1 Small change to allow for generation of QuickTime module for Windows. 2001-12-18 15:48:28 +00:00
Just van Rossum b48f1d3f8a OSX tweak: recognize both EXTERN_API_C and EXTERN_API declarations.
Jack: I hope I didn't break anything for you!
2001-12-12 20:51:22 +00:00
Guido van Rossum f0953b9dff Fix SF bug #482171: webchecker dies on file: URLs w/o robots.txt
The cause seems to be that when a file URL doesn't exist,
urllib.urlopen() raises OSError instead of IOError.  Simply add this
to the except clause.  Not elegant, but effective. :-)
2001-12-11 22:41:24 +00:00
Jack Jansen 5801a2d8e3 The module generator now tells its object generators about the module name (through the new setmodulename() method). If the module name has been set the object generators output it as part of the tp_name field for the object type. 2001-12-09 23:25:00 +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
Jack Jansen b3be216b41 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
changes from start of branch upto r22b2 were already merged, of course).
2001-11-30 14:16:36 +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
Jack Jansen 1062e706e5 Don't initialize tp_type statically, it won't work on Windows. Spotted
by Thomas Heller (patch 459442).
2001-11-14 15:48:13 +00:00
Jack Jansen fc6a89270e Don't override asplit_pat in Scanner_UH3. No reason to do so, and it broke
generating Waste.
2001-10-30 13:11:24 +00:00
Guido van Rossum 03f7f08874 Part 2/2 of SF patch #416704: More robust freeze, by Toby Dickenson.
(With slight cosmetic improvements to shorten lines and a grammar fix
to a docstring.)

This addes -X and -E options to freeze.  From the docstring:

-X module     Like -x, except the module can never be imported by
              the frozen binary.

-E:           Freeze will fail if any modules can't be found (that
              were not excluded using -x or -X).
2001-10-18 19:15:32 +00:00
Jeremy Hylton b8903fbf9b Test utility to look for bad stacksize calculations. 2001-10-17 13:39:06 +00:00
Guido van Rossum 342d8f7780 Update outdated text about how to fix the font. 2001-10-08 22:49:12 +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
Fred Drake 19405a4a2a Removed files no longer needed. 2001-09-28 17:22:35 +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
Jeremy Hylton fe148c80b7 Update description of Tools/compiler 2001-09-20 15:27:30 +00:00
Jeremy Hylton 5953b40442 Remove setup.py, unnecessary since compiler package is the std
library.

Update README.
2001-09-20 15:02:27 +00:00
Jeremy Hylton e54b5b4f81 Moved to Tools/compiler along with astgen.py 2001-09-20 14:59:00 +00:00
Jeremy Hylton b3c569ce82 The compiler package is now part of the standard library.
Remove all these files.  All except astgen.py are moved to Lib/compiler.
2001-09-20 01:27:40 +00:00
Jeremy Hylton 5d1e34aa42 Track changes to compiler API 2001-09-17 21:31:35 +00:00
Jeremy Hylton 9dca36432e API change:
compile() becomes replacement for builtin compile()
compileFile() generates a .pyc from a .py
both are exported in __init__

compiler.parse() gets optional second argument to specify compilation
mode, e.g. single, eval, exec

Add AbstractCompileMode as parent class and Module, Expression, and
Interactive as concrete subclasses.  Each corresponds to a compilation
mode.

THe AbstractCompileMode instances in turn delegate to CodeGeneration
subclasses specialized for their particular functions --
ModuleCodeGenerator, ExpressionCodeGeneration,
InteractiveCodeGenerator.
2001-09-17 21:02:51 +00:00
Jeremy Hylton c8ed18a4e3 Re-created after change to astgen to calculate hardest_arg correctly 2001-09-17 20:17:02 +00:00
Jeremy Hylton eab4328f1a Fix calculation of hardest_arg.
The argument properties are ordered from easiest to hardest.  The
harder the arg, the more complicated that code that must be generated
to return it from getChildren() and/or getChildNodes().  The old
calculation routine was bogus, because it always set hardest_arg to
the hardness of the last argument.  Now use max() to always set it to
the hardness of the hardest argument.
2001-09-17 20:16:30 +00:00
Jeremy Hylton 2e4cc7e0d8 Last set of change to get regression tests to pass
Remove the only test in the syntax module.  It ends up that the
transformer must handle this error case.

In the transformer, check for a list compression in com_assign_list()
by looking for a list_for node where a comma is expected.

In pycodegen.compile() re-raise the SyntaxError rather than catching
it and exiting
2001-09-17 19:33:48 +00:00
Jeremy Hylton bf80a033ee Add -p option to invoke Python profiler 2001-09-17 18:08:40 +00:00
Jeremy Hylton ce0c19c4a8 Only print attributes that start with co_.
If passed a .py file as an argument, try to find its accompanying
.pyc.
2001-09-17 18:08:20 +00:00
Jeremy Hylton 37c9351cf6 Handle more syntax errors.
Invoke compiler.syntax.check() after building AST.  If a SyntaxError
occurs, print the error and exit without generating a .pyc file.

Refactor code to use compiler.misc.set_filename() rather than passing
filename argument around to each CodeGenerator instance.
2001-09-17 18:03:55 +00:00
Jeremy Hylton 09392b77a4 Add utility to set filename attribute on all nodes 2001-09-17 18:02:21 +00:00
Jeremy Hylton aee0bfedcc support true division 2001-09-17 16:41:02 +00:00
Tim Peters a2e2dbe8cd Improve handling of docstrings. I had feared this was a case of
introspection incompatibility, but in fact it's just that calltips
always gave up on a docstring that started with a newline (but
didn't realize they were giving up <wink>).
2001-09-16 02:19:49 +00:00
Jeremy Hylton 1048aa933f Add code generator for yield stmt 2001-09-14 23:17:55 +00:00
Jeremy Hylton 6a9cac68b6 del no longer necessary now that new module is gone 2001-09-14 22:54:48 +00:00
Jeremy Hylton 1e99a77120 Various sundry changes for 2.2 compatibility
Remove the option to have nested scopes or old LGB scopes.  This has a
large impact on the code base, by removing the need for two variants
of each CodeGenerator.

Add a get_module() method to CodeGenerator objects, used to get the
future features for the current module.

Set CO_GENERATOR, CO_GENERATOR_ALLOWED, and CO_FUTURE_DIVISION flags
as appropriate.

Attempt to fix the value of nlocals in newCodeObject(), assuming that
nlocals is 0 if CO_NEWLOCALS is not defined.
2001-09-14 22:49:08 +00:00
Jeremy Hylton 652a22437a The object-being sliced in an assignment to a slice is referenced, not
bound.

When a Yield() node is visited, assign to the generator attribute of
the scope, not the visitor.
2001-09-14 22:45:57 +00:00
Jeremy Hylton 9ee78f7d61 the new new doesn't define CO_xxx as the old new did 2001-09-14 22:44:35 +00:00
Jeremy Hylton fff252d20d the names attribute of Global is not a node 2001-09-14 22:40:36 +00:00
Mark Hammond 773c83be04 Fix for bug #442374 - Modulefinder registry support broken 2001-09-05 23:42:36 +00:00
Jack Jansen 5a1516bce5 Only output the buffer size error label if it is used.
Shuts up another couple of gcc warnings.
2001-09-05 10:27:53 +00:00
Jack Jansen d157b3795b Don't use a default "int" return type, gcc gives a warning about it. 2001-09-04 22:16:33 +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
Jeremy Hylton 71ebc3359b Fix _convert_NAME() so that it doesn't store locals for class bodies.
Fix list comp code generation -- emit GET_ITER instead of Const(0)
after the list.

Add CO_GENERATOR flag to generators.

Get CO_xxx flags from the new module
2001-08-30 20:25:55 +00:00
Jeremy Hylton f71b5fec43 spurious pop 2001-08-30 15:50:34 +00:00
Jeremy Hylton e4685ec57e Track the block stack more reasonably in order to handle continue in
try/except or try/finally.

Previous versions had only track SETUP_LOOP blocks and ignored the
exception part.  This meant that it allowed continue inside a
try/except but generated buggy code.  Now it does the right thing.
2001-08-29 22:30:09 +00:00
Jeremy Hylton 9263848fa1 Improve stack depth computation for try/except and try/finally
Add CONTINUE_LOOP to the list of unconditional transfers
2001-08-29 22:27:14 +00:00
Jeremy Hylton 4bd4dddd55 Add __getitem__() handler for use by visitContinue() 2001-08-29 22:26:35 +00:00
Jeremy Hylton 1936745668 Generate SET_LINENO for list and tuple literals when the open paren
starts a new line.

Also fix undetected typo in visitDict() -- uncovered by recent change
to add lineno attrs to atoms.
2001-08-29 20:57:43 +00:00
Jeremy Hylton 7845cf8d37 Make sure that atoms (Tuple, List, etc.) have lineno attributes 2001-08-29 20:56:30 +00:00
Jeremy Hylton 4ba9001f5c Fix off-by-one errors in code to find depth of stack.
XXX The code is still widely inaccurate, but most (all?) of the time
it's an overestimate.
2001-08-29 20:55:17 +00:00
Jeremy Hylton bf77c465bd Undo change from list to dict for handling varnames, consts, etc.
As the doc string for _lookupName() explains:

    This routine uses a list instead of a dictionary, because a
    dictionary can't store two different keys if the keys have the
    same value but different types, e.g. 2 and 2L.  The compiler
    must treat these two separately, so it does an explicit type
    comparison before comparing the values.
2001-08-29 19:45:33 +00:00
Jeremy Hylton 5a9ac97040 Change default() to use getChildNodes() instead of getChildren() 2001-08-29 18:17:22 +00:00
Jeremy Hylton 94afe32b5e Support // and //=
Generate SET_LINENO for del statements.

Define klass=1 for PyFlowGraph constructor for a class statement.  A
class has no varnames.
2001-08-29 18:14:39 +00:00
Jeremy Hylton 7abf520d6c Add support for // and //=.
Avoid if/elif/elif/else tests where the final else is supposed to
handle exactly one case instead of all other cases.  When the list of
operators is extended, the catchall else treats all new operators as
the last operator in the set of tests.  Instead, raise an exception if
an unexpected operator occurs.
2001-08-29 18:12:30 +00:00
Jeremy Hylton d4be10dc2c Add generator detection to symbol table.
Fix bug in handling of statements like "l[x:y] = 2".  The visitor was
treating this as assignments to l, x, and y!
2001-08-29 18:10:51 +00:00
Jeremy Hylton e4e9cd4c01 Modify name conversion to be (hopefully) a bit more efficient.
Use a dictionary instead of a list to map objects to their offsets in
a const/name tuple of a code object.

XXX The conversion is perhaps incomplete, in that we shouldn't have to
do the list2dict to start.
2001-08-29 18:09:50 +00:00
Jeremy Hylton 5477f529d6 Revise implementations of getChildren() and getChildNodes().
Add support for floor division (// and //=)

The implementation of getChildren() and getChildNodes() is intended to
be faster, because it avoids calling flatten() on every return value.
But it's not clear that it is a lot faster, because constructing a
tuple with just the right values ends up being slow.  (Too many
attribute lookups probably.)

The ast.txt file is much more complicated, with funny characters at
the ends of names (*, &, !) to indicate the types of each child node.

The astgen script is also much more complex, making me wonder if it's
still useful.
2001-08-29 18:08:02 +00:00
Jeremy Hylton da8db8ca18 Don't include doc string of class in its code child 2001-08-29 17:19:02 +00:00
Jeremy Hylton 2ac9c3eec5 Make sure the JUMP_ABSOLUTE and POP_BLOCK at the end of a for loop are
contiguous.
2001-08-28 17:28:33 +00:00
Jeremy Hylton 63db7b9ca1 XXX_NAME ops should affect varnames
varnames should list all the local variables (with arguments first).
The XXX_NAME ops typically occur at the module level and assignment
ops should create locals.
2001-08-28 16:36:12 +00:00
Jeremy Hylton f354575328 Generate FOR_ITER-based loops instead of old FOR_LOOP-based loops 2001-08-28 16:35:18 +00:00
Jeremy Hylton c59e220000 Handle private names
(Hard to believe these were never handled before)

Add misc.mangle() that mangles based on the rules in compile.c.
XXX Need to test the corner cases

Update CodeGenerator with a class_name attribute bound to None.  If a
particular instance is created within a class scope, the instance's
class_name is bound to that class's name.

Add mangle() method to CodeGenerator that mangles if the class_name
has a class_name in it.

Modify the FunctionCodeGenerator family to handle an extra argument--
the class_name.

Wrap all name ops and attrnames in calls to self.mangle()
2001-08-27 22:56:16 +00:00
Jeremy Hylton 80ea40d858 emit SET_LINENO for augmented assignments 2001-08-27 21:58:09 +00:00
Jeremy Hylton 2afff324ea Many changes -- bug fixes and sundry improvements
Make nested scopes enabled by default

Add is_constant_false() helper so that compiled code and symbols are
consistent with builtin compiler's handling of "if 0:"

Fix doc string handling to be consistent with recent change that
eliminates the doc string from the Module's node attribute.

Add fix to print handling from Evan & Shane.

Track change to visitor api by making "verbose" explicit.

Comment out setting CO_NESTED flag (it's unnecessary in 2.2).
2001-08-27 21:51:52 +00:00
Jeremy Hylton cd8a127e1a Fix for sibling nodes that define the same free variable
Evan Simpson's fix.  And his explanation:

    If you defined two nested functions in a row that refer to the
    same non-global variable, the second one will be generated as
    though the variable were global.
2001-08-27 21:06:35 +00:00
Jeremy Hylton 7e30c9bb5a Add lookup_name() to optimize use of stack frames
The use of com_node() introduces a lot of extra stack frames, enough
to cause a stack overflow compiling test.test_parser with the standard
interpreter recursionlimit.  The com_node() is a convenience function
that hides the dispatch details, but comes at a very high cost.  It is
more efficient to dispatch directly in the callers.  In these cases,
use lookup_node() and call the dispatched node directly.

Also handle yield_stmt in a way that will work with Python 2.1
(suggested by Shane Hathaway)
2001-08-27 21:02:51 +00:00
Jeremy Hylton 058a5adad0 Two changes to visitor API:
Remove _preorder as alias for dispatch and call dispatch directly.
    Add an extra optional argument to walk()

XXX Also comment out some code that does debugging prints.
2001-08-27 20:47:08 +00:00
Jeremy Hylton cccc478577 Why didn't I think of Fred off the top of my head? 2001-08-27 20:44:20 +00:00
Jeremy Hylton 627673396a Add everyone I can think of off the top of my head 2001-08-27 20:43:16 +00:00
Jeremy Hylton 2a8ec79353 Revise regrtest to compile entire standard library.
The tests are run from a copy of the library directory, where
everything has been compiled by the compiler package.

Add a raw_input() call at the end of the script, so that I can check
the output before the temp directory with the compiled code is
removed.
2001-08-27 20:40:43 +00:00
Jeremy Hylton 33c2a627f1 Add -c option to continue if one file has a SyntaxError 2001-08-27 20:39:21 +00:00
Jack Jansen 9403591014 Fixes by Thomas Heller:
- make the selftests work again (they were apparently not used since
  very early in bgen's development), with some minor cleanup by me
- make emacs python mode happier
2001-08-27 14:30:55 +00:00
Barry Warsaw e98e462dab Bump to version 1.3. Also document the new behavior of the chip widgets. 2001-08-23 16:15:21 +00:00
Barry Warsaw 924ea05e45 Bump to version 1.3 2001-08-23 16:15:02 +00:00
Barry Warsaw e47e97792a Implement some suggestions by Laura Creighton.
ChipWidget.__init__(): Added a message area just below the color
    name.  Both the message and name widgets are now FLAT, DISABLED
    Entry widgets instead of Labels.  This allows users to
    copy-n-paste the color names or color specs.  Also, the contents
    of both widgets are now driven by StringVars.

set_color(): This only sets the chip color; it does not set the name
    widgets.

set_name(): New method which only sets the name widget contents.

set_message(): New method which only sets the message widget contents.

ChipViewer.update_yourself(): Set the color, name, and message for
    each chip as follows: the first line always contains the color
    spec in #rrggbb format.  The second line will contain the color
    name, but slightly differently for each widget.  For the Selected
    widget, if the color exactly matches the Nearest color, the name
    is shown, otherwise the message field will be empty.  The name
    field of the Nearest widget will always contain the color name.
2001-08-23 16:14:45 +00:00
Jeremy Hylton 241d69c11b Add a little introductory text.
Change several sections to subsections (part of the manual -> howto
transformation).

Flesh out discussion of assignment nodes (and delete statements).

Add an example of manipulating AST objects at a >>> prompt
2001-08-18 00:24:46 +00:00
Jeremy Hylton ab427b8cce Generate correct reprs for Mul, Add, etc. 2001-08-18 00:14:37 +00:00
Jeremy Hylton ec5bfd13ca Track removal of doc string from Module().nodes[0] 2001-08-18 00:07:46 +00:00
Jeremy Hylton 8548f9b183 Add Yield() node 2001-08-18 00:07:14 +00:00
Jeremy Hylton ec927348c2 Add Yield() statement handler
Fix Module() handler to avoid including the doc string in the AST
2001-08-18 00:04:31 +00:00
Fred Drake 4e6a3fe0f6 Remove spurious space before a period. 2001-08-15 18:48:10 +00:00
Fred Drake 834a85a235 Use the "howto" document class rather than the "manual" class.
Remove the module index; there aren't enough modules documented yet
for this to make sense.

Add a couple more index entries, fixed a few typos, and adjusted a few
more things for consistency.
2001-08-15 17:01:34 +00:00
Fred Drake 27413a5eda Properly mark attribute names in the table. 2001-08-15 16:47:10 +00:00
Fred Drake 3d05161c83 Change the generated markup so that attribute names are properly marked. 2001-08-15 16:46:22 +00:00
Fred Drake 42caf3f6a3 Fix small markup consistency nits. 2001-08-15 14:35:13 +00:00
Tim Peters ebb7133f4f Fix typo in module docstring. 2001-08-15 06:07:42 +00:00
Jeremy Hylton f5bf77c3f8 update simple explanation of parseFile() 2001-08-14 22:38:03 +00:00
Jeremy Hylton 76f42ac512 First day's progress on documentation 2001-08-14 22:04:44 +00:00
Jeremy Hylton 9272b14d62 Fix typo in astgen script 2001-08-14 21:18:30 +00:00
Jeremy Hylton 7713ac2ff1 Regenerated from new ast.txt and new astgen.py 2001-08-14 18:59:01 +00:00
Jeremy Hylton eef65908a1 Add getChildNodes() method to Node 2001-08-14 18:58:00 +00:00
Jeremy Hylton 34aeeffb62 Add Yield node 2001-08-14 18:57:43 +00:00
Andrew M. Kuchling 392aa1de1d Update e-mail address 2001-08-13 15:10:54 +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
Guido van Rossum 38507ae614 Finally fix SF bug #441172, using a variant of patch ##443626:
canceling an edit operation would not revert the value of the field.
The fix takes care to destroy the Entry object, as suggested in the
patch.
2001-08-11 04:37:07 +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
Martin v. Löwis 6113d352a6 Patch #422471: Install IDLE Help File 2001-08-08 20:26:14 +00:00
Andrew M. Kuchling 564165e5c5 Added README to this directory 2001-08-08 19:10:11 +00:00
Guido van Rossum 44b1e7d840 Fix for SF bug #448835.
Fix this to work with the new (still undocumented) tabnanny API.

I'm afraid Stephen will have to add this fix to the IDLE fork code
base as well.
2001-08-07 17:15:36 +00:00
Andrew M. Kuchling 5dd064aac3 Tabify the file (pointed out by Thomas Wouters) 2001-08-06 19:33:52 +00:00
Andrew M. Kuchling ce2f4037ba Update listing of subdirectories
Update link to a running instance of the FAQwizard
2001-08-06 18:55:22 +00:00
Jack Jansen 1fbad002d7 Oops, this file was apparently never added to the repository. Now it is. 2001-08-06 10:08:56 +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
Barry Warsaw 63ce5af496 Added the -X/--no-docstrings flag which takes a filename containing a
list of files to not extract docstrings from when the -D option is
given.  This isn't optimal, but I didn't want to change the semantics
of -D, and it's bad form to allow optional switch arguments.

Bumping __version__ to 1.4.

TokenEater.__init__(): Initialize __curfile to None.

__waiting(): In order to extract docstrings from the module, both the
    -D flag should be set, and the __curfile should not be named in
    the -X filename (i.e. it isn't in opts.nodocstrings).

set_filename(): Fixed a bug where once the first module docstring is
    extracted, no subsequent module docstrings will be extracted.  The
    bug was that the first extraction set __freshmodule to 0, but that
    flag was never reset back to 1.  set_filename() is always called
    when the next file is being processed, so use it to reset the
    __freshmodule flag.

main(): Add support for -X/--no-docstring.
2001-07-27 16:47:18 +00:00
Fred Drake 79e75e1916 Use string.ascii_letters instead of string.letters (SF bug #226706). 2001-07-20 19:05:50 +00:00
Fred Drake cd694c44a9 Use string.ascii_letters instead of string.letters (SF bug #226706).
Move computation of sets of characters out of the body of the function that
uses them.
2001-07-20 18:58:42 +00:00
Jack Jansen 3d3a91c188 Oops, left in a debug statement. It's gone now. 2001-07-17 20:44:50 +00:00
Jack Jansen b2a1de4679 Allow [] after a parameter name. We currently take this to be the same as * in front, which isn't 100% correct but good enough. 2001-07-13 22:28:36 +00:00
Barry Warsaw 780028e14c Change the way hex type-ins are displayed. The old way was way too
fragile.  Now the leading "0x" on hex numbers are displayed as labels
and the type-in entry fields just accept the hex digits.  Be sure to
strip off the "0x" string when displaying hex values too.

Also, de-string-module-ification, and other Python 2.x improvements.
2001-07-10 21:50:44 +00:00
Barry Warsaw ffa926d77e __init__(), save_views(): Catch ValueError along with IOError and
EOFError so any failures in unmarshalling are just ignored.  Use
print>> instead of sys.stderr.write().
2001-07-10 21:48:51 +00:00
Barry Warsaw 698c14936a Update a comment. 2001-07-10 21:45:27 +00:00
Barry Warsaw 179048fc5d __init__(): Use augmented assignments. 2001-07-10 21:44:59 +00:00
Barry Warsaw 8e4fa072f7 De-string-module-ification. 2001-07-10 21:44:24 +00:00
Barry Warsaw 60e1886e87 __version__: Bump to 1.2
De-string-module-ification.
2001-07-10 21:42:04 +00:00
Barry Warsaw 95cf9d9f4e __populate(): Use augmented assignments. 2001-07-10 21:39:41 +00:00
Barry Warsaw b4d8612f2b __delta(): Use augmented assignments. 2001-07-10 21:39:18 +00:00
Barry Warsaw 6c50ae0801 De-string-module-ification and other Python 2.x improvements. 2001-07-10 21:38:47 +00:00
Barry Warsaw 2803046992 Update a comment. 2001-07-10 21:37:28 +00:00
Barry Warsaw 3e481de337 Updated documentation, and bump the version number to 1.2. 2001-07-10 21:37:04 +00:00
Guido van Rossum 4269601f5c Amazing. A very subtle change in policy in descr-branch actually
found a bug here.  Here's the deal:

Class PyShell derives from class OutputWindow.  Method PyShell.close()
wants to invoke its parent method, but because PyShell long ago was
inherited from class PyShellEditorWindow, it invokes
PyShelEditorWindow.close(self).  Now, class PyShellEditorWindow itself
derives from class OutputWindow, and inherits the close() method from
there without overriding it.  Under the old rules,
PyShellEditorWindow.close would return an unbound method restricted to
the class that defined the implementation of close(), which was
OutputWindow.close.  Under the new rules, the unbound method is
restricted to the class whose method was requested, that is
PyShellEditorWindow, and this was correctly trapped as an error.
2001-07-06 20:26:31 +00:00
Jack Jansen eefac35594 Added WeakLink...Generator classes (should have done that ages ago). These check the c-function pointer for being NULL before calling it and raise UnimplementedError if it is.
This allows system libs to be weak-linked, thereby allowing us to generate functions that are only available on some OS versions without getting a NULL dereference if the function isn't available.
2001-07-01 22:09:29 +00:00
Jack Jansen 1319abf745 Make basechain a class variable in stead of initializing it in __init__. That way it's more easily overridden. 2001-06-28 22:07:30 +00:00
Jack Jansen 4f0f1584fb Added a couple more types that Apple has taken a fancy to. 2001-06-27 21:58:40 +00:00
Jack Jansen ff1cc902fe Added a Parser_OSX class that can parse new-style (C-only) headers,
such as the Core Foundation ones.
2001-06-26 21:53:25 +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
Barry Warsaw 5c94ce58e7 write(): Karl Eichwalder points out that the #, flag comments should
be outputted just before the msgid lines.
2001-06-20 19:41:40 +00:00
Barry Warsaw 8c78d3a5d1 write(): It's been generally agreed on the i18n-sig that the docstring
marker should be output as a #, flag, e.g. "#, docstring".
2001-06-19 19:54:19 +00:00
Tim Peters 82ac8d13ff Taught IDLE's autoident parser that "yield" is a keyword that begins a
stmt.  Along w/ the preceding change to keyword.py, making all this work
w/ a future-stmt just looks harder and harder.
2001-06-19 00:28:47 +00:00
Guido van Rossum ac4797a12e Make copy, cut and paste events case insensitive. Reported by Patrick
K. O'Brien on idle-dev.

(Should other bindings follow suit?)
2001-06-12 00:30:33 +00:00
Tim Peters 2a7f384122 SF bug 430991: wrong co_lnotab
Armin Rigo pointed out that the way the line-# table got built didn't work
for lines generating more than 255 bytes of bytecode.  Fixed as he
suggested, plus corresponding changes to pyassem.py, plus added some
long overdue docs about this subtle table to compile.c.

Bugfix candidate (line numbers may be off in tracebacks under -O).
2001-06-09 09:26:21 +00:00
Martin v. Löwis a4debfffc9 Patch #430754: Makes ftpmirror.py .netrc aware 2001-06-07 17:17:00 +00:00
Guido van Rossum d993c87918 Quick update to the extension mechanism (extend.py is gone, long live
config.txt).

*** This is a bugfix-release candidate (for 2.1.1 and 2.0.1)! ***
2001-06-04 21:21:11 +00:00
Neil Schemenauer 89e90d67aa Separate CFLAGS and CPPFLAGS. CFLAGS should not contain preprocessor
directives, which is the role of CPPFLAGS.  Closes SF patch #414991.
2001-06-02 06:16:02 +00:00
Barry Warsaw 50cf706b5c write(): Aggressively sort all catalog entries, and fix the bug where
there were multiple translatable strings on a single line of source
code.
2001-05-24 23:06:13 +00:00
Barry Warsaw 128c77d03a write(): Do two levels of sorting: first sort the individual location
tuples by filename/lineno, then sort the catalog entries by their
location tuples.
2001-05-23 16:59:45 +00:00
Barry Warsaw 2b63969a5a main(): default-domain argument to getopt.getopt() was missing a = to
indicate it took an argument.  This closes SF patch #402223 by Bastian
Kleineidam.
2001-05-21 19:58:23 +00:00
Barry Warsaw 16b62c1300 __addentry(): add optional keyword arg `isdocstring' which is a flag
indicating whether the entry was extracted from a docstring or not.

write(): If any of the locations of a string appearance came from a
docstring, add a comment such as

#. docstring

before the references (after a suggestion by Martin von Loewis).
2001-05-21 19:51:26 +00:00
Barry Warsaw 6e972414be write(): A patch inspired by Tokio Kikuchi that sorts location entries
first by filename and then by line number.  Closes SF patch #425821.

Also, fixes a problem with duplicate entries.
2001-05-21 19:35:20 +00:00
Jack Jansen 656fe69383 Generate prototype-style function headers in stead of K&R style. Makes life easier with gcc -Wstrict-function-prototypes. 2001-05-19 13:59:18 +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
Guido van Rossum e9d7f0779d Refactored, with some future plans in mind.
This now uses the new gotofileline() method defined in FileList.py.
2001-05-12 12:30:04 +00:00
Guido van Rossum 6cb7a21934 Move the action of loading the configuration to the IdleConf module
rather than the idle.py script.  This has advantages and
disadvantages; the biggest advantage being that we can more easily
have an alternative main program.
2001-05-12 12:18:10 +00:00
Guido van Rossum 8451ebb435 Delete goodname() method, which is unused.
Add gotofileline(), a convenience method which I intend to use in a
variant.

Rename test() to _test().
2001-05-12 12:11:36 +00:00
Fred Drake a2133339ff Only catch NameError and TypeError when attempting to subclass an
exception (for compatibility with old versions of Python).
2001-05-11 19:40:10 +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
Fred Drake 223ac0a498 Remove BrowserControl module; this had been left in for Python 1.5.2
support.
2001-04-18 18:43:34 +00:00
Fred Drake 6e06531d92 Remove legacy support for the BrowserControl module; the webbrowser
module has been included since Python 2.0, and that is the preferred
interface.
2001-04-18 18:42:48 +00:00
Barry Warsaw 2720d380e9 update_yourself(): Removed unused local variable reported by
PyChecker.
2001-04-18 03:53:29 +00:00
Barry Warsaw 31c2dae39c __init__(): Removed unused local variable reported by PyChecker. 2001-04-18 03:52:54 +00:00
Barry Warsaw 741eae0b31 StripWidget.__init__(), update_yourself(): Removed some unused local
variables reported by PyChecker.

__togglegentype(): PyChecker accurately reported that the variable
__gentypevar was unused -- actually this whole method is currently
unused so comment it out.
2001-04-18 03:51:55 +00:00
Barry Warsaw 6a5522677a Helpwin.__init__(): Removed an unused local variable (via import)
reported by PyChecker.
2001-04-18 03:50:07 +00:00
Barry Warsaw cc8a60cdf6 Bump the version to 1.1 2001-04-18 03:49:00 +00:00
Barry Warsaw 6330b52327 There have been a few new Python releases <wink> in the 2 years since
this tool was last touched!  Update some of the introductory material
and bump the version to 1.1.
2001-04-18 03:48:41 +00:00
Jeremy Hylton bb0bae6da2 Pop loop off the loop stack before handling the loop's else clause.
Otherwise, continue/break will attempt to affect the wrong loop.

A few more fiddles to get the SET_LINENOs consistent across compilers.
2001-04-12 21:54:41 +00:00
Jeremy Hylton 13d70944cb Use new _implicitNameOp() to generate name op code for list comprehensions.
Always emit a SET_LINENO 0 at the beginning of the module.  The
builtin compiler does this, and it's much easier to compare bytecode
generated by the two compilers if they both do.

Move the SET_LINENO inside the FOR_LOOP block for list
comprehensions.  Also for compat. with builtin compiler.
2001-04-12 21:04:43 +00:00
Jeremy Hylton 614e87f286 Add support for visitAssAttr to findOp(). 2001-04-12 20:24:26 +00:00
Jeremy Hylton 542b11acfd pyassem.py:
Fix annoying bugs in flow graph layout code.  In some cases the
    implicit control transfers weren't honored.  In other cases,
    JUMP_FORWARD instructions jumped backwards.

    Remove unused arg from nextBlock().

pycodegen.py

    Add optional force kwarg to set_lineno() that will emit a
    SET_LINENO even if it is the same as the previous lineno.

    Use explicit LOAD_FAST and STORE_FAST to access list comp implicit
    variables.  (The symbol table doesn't know about them.)
2001-04-12 20:21:39 +00:00
Jeremy Hylton bfb0cf822b Revise handling of tuple arguments so that the variables names match
those used by compile.c.  (test_grammar now depends on the names)
2001-04-12 17:33:34 +00:00
Jeremy Hylton 5c9aad6043 Only treat an AugAssign as def if its the target is a Name.
Fixes last bug found with test_scope.py.
2001-04-12 07:06:25 +00:00
Jeremy Hylton 3f76b7e6e4 Fix unpackSequence() to use _nameOp() rather than LOAD_FAST 2001-04-12 06:52:27 +00:00
Jeremy Hylton 660cc77abb Inside a class scope always use LOAD_NAME, STORE_NAME, DEL_NAME 2001-04-12 06:49:00 +00:00
Jeremy Hylton 364f9b9e2f Preliminary support for nested scopes
XXX Still doesn't work right for classes
XXX Still doesn't do sufficient error checking
2001-04-12 06:40:42 +00:00
Jeremy Hylton 53ee2a94c7 Define constants for types of scopes 2001-04-12 06:39:24 +00:00
Jeremy Hylton 84ec1f9159 typo 2001-04-11 16:43:13 +00:00
Jeremy Hylton 01d12937df [finishing fix from earlier checkins]
Call set_lineno() in visitDiscard(), which will generate linenos for
discard statements, e.g. the statement "1/0"

Fixes SF bug #409587
2001-04-11 16:36:25 +00:00
Jeremy Hylton d91bbba89d Add support for extra (*) arguments to preorder.
Change default dispatch to use extended call syntax in place of apply.
2001-04-11 16:26:05 +00:00
Jeremy Hylton 9ab019bee7 Generate docstrings.
Fixes SF buf #217004

Add method fixDocstring() to CodeGenerator.  It converts the Discard
node containing the docstring into an assignment to __doc__.
2001-04-11 16:24:30 +00:00
Jeremy Hylton 4c1f42733c Add lineno attributes to Discard nodes 2001-04-11 16:22:26 +00:00
Jeremy Hylton 5af105eec9 Make sure the docstring is always entered as the first element in the
consts, even if it is None.

Simplify _lookupName() by removing lots of redundant tests.
2001-04-11 16:21:51 +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
Jeremy Hylton dbdb28e8be Add globals to list of names returned by get_names().
Fix func arg processing to handle args in tuples.
In test code, skip names beginning with '.'.
2001-04-09 20:11:59 +00:00
Jeremy Hylton f870c952f9 Add two arguments to Scope constructor, module scope and class name
Add mangling support
Add get_children() and add_child() methods to Scope
Skip nodes when If test is a false constant
Add test code that checks results against symtable module
2001-04-09 13:57:32 +00:00
Jeremy Hylton 8b966dcf03 Add preliminary module symbol table constructor 2001-04-09 04:35:35 +00:00
Jeremy Hylton 80e29bd139 Add support for future statements 2001-04-09 04:28:48 +00:00
Jeremy Hylton 42a0830713 Fix "import as" (has always skipping the as name)
Fix com_NEWLINE() so that is accepts arguments, which occurs for lines like:
    stmt; # note trailing semicolon
Add XXX about checking for assignment to list comps
2001-04-09 04:27:12 +00:00
Jeremy Hylton a384f737cc typo 2001-04-09 04:23:55 +00:00
Fred Drake d34a9c98a9 Added more link attributes based on additonal information from Chris
McCafferty <christopher.mccafferty@csg.ch>, and a bit of experimentation
with Navigator 4.7.

HTML-as-deployed is evil!
2001-04-05 18:14:50 +00:00
Fred Drake f3186e8242 A number of improvements based on a discussion with Chris McCafferty
<christopher.mccafferty@csg.ch>:

Add javascript: and telnet: to the types of URLs we ignore.

Add support for several additional URL-valued attributes on the BODY,
FRAME, IFRAME, LINK, OBJECT, and SCRIPT elements.
2001-04-04 17:47:25 +00:00
Tim Peters 301ab7f2d0 Initialize new save_warnings_filters data member in ModifiedInterpreter.__init__.
Was getting mystery
    ModifiedInterpreter instance has no attribute 'save_warnings_filters'
errors at odd times (for sure in a fresh IDLE, fresh file, then Run Script).
2001-03-29 03:34:43 +00:00
Guido van Rossum b4ce43011e Turn SyntasWarning into SyntaxError for all code entered
interactively.
2001-03-26 17:41:35 +00:00
Ka-Ping Yee fde8a86a4e Script for starting pydoc with a GUI in Windows. 2001-03-23 14:10:39 +00:00
Guido van Rossum 53f5968f9b Make this IDLE version 0.8. (We have to skip 0.7 because that was a
CNRI release in a corner of the basement of a government building on a
planet circling Aldebaran.)
2001-03-22 17:37:52 +00:00
Guido van Rossum 3cc1250f16 Don't use __debug__ as if it were some module global. Use DEBUG
instead.
2001-03-22 17:27:13 +00:00
Martin v. Löwis 2c91c815d4 Patch #409504: Fix regex problems, consider \-continuation lines in Makefile
and Setup.
2001-03-21 06:58:25 +00:00
Guido van Rossum 6b767ac81a Lawrence Hudson, SF #401702: Modify co_filename in frozen programs
This patch was developed primarily to reduce the size of the
  frozen binary.  It is particularly useful when freezing for 'small'
  platforms, such as Palm OS, where you really want to save that
  last miserable byte.

  A limitation of this patch is that it does not provide any feedback
  about the replacements being made.  As the path matching
  is case-sensitive this may lead to unexpected behaviour for DOS
  and Windows people, eg
      > freeze.py -r C:\Python\Lib\=py\ goats.py
  should probably be:
      > freeze.py -r c:\python\lib\=py\ goats.py
2001-03-20 20:43:34 +00:00
Eric S. Raymond 1bb515b0e5 Teach Tools/freeze/makeconfig.py and Tools/freeze/parsesetup.py to use
the re package rather than the obsolete regex.
2001-03-18 11:27:58 +00:00
Tim Peters 401396fc60 Get rid of hardcoded Python path (can't guess where the user installed
IDLE, and it likely changes across releases anyway).
2001-03-10 21:48:24 +00:00
Barry Warsaw 78d7dc4979 Added -o/--output-file option as per GNU msgfmt to specify the output
file instead of using inputfilename.mo
2001-03-02 16:53:54 +00:00
Martin v. Löwis 0f6b3832b9 Put current date into POT-Creation-Date; leave PO-Revision-Date for
for the translator to update; that is compatible with xgettext 0.10.35.
2001-03-01 22:56:17 +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
Jack Jansen 8a69373664 Dialog and Window objects are (finally) different beasts. 2001-02-27 11:05:00 +00:00
Jack Jansen d67566b0f0 Use the filename, not the pathname, in the definitions file
comment. This way the generated files are identical when generated on
different machines.
2001-02-27 11:04:20 +00:00
Barry Warsaw 75ee8f54fa main(): Slightly more informative error message when TokenError
occurs.  Also, continue processing.
2001-02-26 04:46:53 +00:00
Tim Peters af449638b6 Patch 103928: Correct zlib freeze settings for Win32. 2001-02-23 03:45:13 +00:00
Fred Drake f5d2fdf164 Hack to make this still work with Python 1.5.2. ;-( 2001-02-16 22:13:48 +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 670fa52698 Whitespace normalization. 2001-02-09 21:23:21 +00:00
Jeremy Hylton 1eab0028e6 move "from Tkinter import *" to module level 2001-02-02 20:07:46 +00:00
Barry Warsaw 1bbc048310 Special case around some of the nastier annoyances with the type-in
fields.  You can now backspace out the 0 in 0x0, and you can clear the
field when in decimal mode.  There are still some oddities about
typing into these fields, but it should be much less annoying.  The
real solution is to ditch the update-while-typing "feature".
2001-02-01 21:31:58 +00:00
Barry Warsaw 74a7ece9f3 Move the "from Tkinter import *" out of the method and into the module
scope (still inside the __name__=='__main__' guard).  Necessitated by
recent addition of nested scopes.
2001-02-01 20:52:08 +00:00
Martin v. Löwis 646ddec41f Allow installation of IDLE via distutils (patch #103138). 2001-01-28 11:01:50 +00:00
Tim Peters 19f52c2e34 Windows: ucnhash subproject no longer exists (/F merged into unicodedata). 2001-01-24 10:07:22 +00:00
Fredrik Lundh b2dfd73bdc Unicode nits: Don't include unicodedatabase.h no more. And make sure
to build *all* tables in makeunicodedata.py.
2001-01-21 23:31:52 +00:00
Fredrik Lundh 7b7dd107b3 compress unicode decomposition tables (this saves another 55k) 2001-01-21 22:41:08 +00:00
Fredrik Lundh 9e9bcda547 forgot to check in the new makeunicodedata.py script 2001-01-21 17:01:31 +00:00
Tim Peters d5d2cd149f Color all word instances of "as" after "import", & on the same line, as if
keywords.  Cheap approximation to the truth.
2001-01-19 10:41:49 +00:00
Guido van Rossum 9d593a526b This still mentioned IdlePrefs.py as the place to edit color
preferences.  It is now in config.txt or ~/.idle.
2001-01-19 03:30:58 +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
Guido van Rossum ecc463a617 New, improved README from Mike Clarkson. Wow! 2001-01-03 23:50:59 +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
Guido van Rossum ef92edd903 Make the test program work outside IDLE. 2001-01-02 21:22:03 +00:00
Guido van Rossum b19f1e3701 Add Alt-slash to Unix keydefs (I somehow need it on RH 6.2).
Get rid of assignment to unused self.text.wordlist.
2001-01-02 18:28:52 +00:00