Commit Graph

953 Commits

Author SHA1 Message Date
Fred Drake 6cd948ebd8 Rename the "browser" module to "BrowserControl", since Guido did not
like the short, ambiguous name.
2000-05-10 17:28:42 +00:00
Fred Drake 8638ace511 EditorWindow.python_docs():
Instead of using Netscape through os.system(), use the new
        browser.open() function to load the documentation on the
        default browser.  On Windows, this will use the installed
        documentation if it exists, instead of hitting python.org.
2000-05-10 16:50:07 +00:00
Fred Drake 95a40001e6 Collection of classes and convenience functions to control external
Web browsers.
2000-05-10 16:47:27 +00:00
Fred Drake bd7b8b3310 Minor edit of leading comments: 'the the' --> 'the', quoted 'enable'
option name for clarity.
2000-05-09 14:28:03 +00:00
Guido van Rossum 4b1235cdac Toby Dickenson:
Fix for problem with freeze when both "-m" and "-s service" options
are used.

(Blessed by MarkH)
2000-05-06 03:18:08 +00:00
Jeremy Hylton be317e615e patches from Mark Hammond
Attached is a set of diffs for the .py compiler that adds support
for the new extended call syntax.

compiler/ast.py:
CallFunc node gets 2 new children to support extended call syntax -
"star_args" (for "*args") and "dstar_args" (for "**args")

compiler/pyassem.py
It appear that self.lnotab is supposed to be responsible for
tracking line numbers, but self.firstlineno was still hanging
around.  Removed self.firstlineno completely.  NOTE - I didnt
actually test that the generated code has the correct line numbers!!

Stack depth tracking appeared a little broken - the checks never
made it beyond the "self.patterns" check - thus, the custom methods
were never called!  Fixed this.

(XXX Jeremy notes: I think this code is still broken because it
doesn't track stack effects across block bounaries.)

Added support for the new extended call syntax opcodes for depth
calculations.

compiler/pycodegen.py

Added support for the new extended call syntax opcodes.

compiler/transformer.py

Added support for the new extended call syntax.
2000-05-02 22:32:59 +00:00
Jeremy Hylton 0a4f1ff64e patches from Mark Hammond
compile.py:
On Windows, use 'nul' instead of '/dev/null'.

test.py:
Use double-quotes for the command-line, as Windows doesnt recognise
singles.
2000-05-02 22:29:46 +00:00
Barry Warsaw 75a6e67e69 Added an unused Unicode string for testing. 2000-05-02 19:28:30 +00:00
Guido van Rossum ce33eb3ee8 Sjoerd Mullender:
Bad % formatting.
2000-05-02 13:49:13 +00:00
Guido van Rossum 6664bb87dc Sjoerd Mullender: cmp.py is obsolete... 2000-04-28 13:31:52 +00:00
Guido van Rossum f3335e193b Patch inspired by Just van Rossum: on the Mac, in savefilename(), make
the path to save a relative path by prefixing it with os.sep (':').
Also fix an indent inconsistency in the same function.
2000-04-25 21:13:24 +00:00
Guido van Rossum e56b4cf804 Jack Jansen: A few new types needed by new API calls. 2000-04-24 14:56:00 +00:00
Guido van Rossum e39a88fd58 Two more items. 2000-04-11 15:30:19 +00:00
Fred Drake d6904ea5a0 Use a better approach to locating IDLE's default configuration,
allowing it to be run from anywhere, including through a symlink to
the actual idle.py script.
2000-04-10 16:27:47 +00:00
Guido van Rossum fa9ef1864f Just in case someone wants to use this, let's fix the pathname. 2000-04-06 20:09:17 +00:00
Guido van Rossum 2b6004a07f New version 1.0.4. I'm sure someone mailed me these patches but I
can't remember who. :-)  Changes:

- Support for Windows NT (different locking behavior)
- Added a logging mechanism
2000-03-31 00:58:00 +00:00
Guido van Rossum 8daef3791e New version 1.0.4. I'm sure someone mailed me these patches but I
can't remember who. :-)  Changes:

- Owner name+email made generic instead of GvR
- Support for Windows NT (running from a .bat file)
- DOcument <HTML>...</HTML> tags
2000-03-31 00:55:54 +00:00
Guido van Rossum e0dd3010ce Removed two files that were added temporarily. 2000-03-30 20:34:56 +00:00
Guido van Rossum b8f512bfa4 Bump version to 0.6 for the event of the Python 1.6 alpha 1 release. 2000-03-30 20:30:34 +00:00
Barry Warsaw bc9476ebe5 __pushtodev(): Ignore transient sunaudiodev.errors when setting the
device info.  I don't know why these occur, but they seem to be
shortlived and harmless.
2000-03-29 21:05:53 +00:00
Guido van Rossum 918429b3b2 Moved robotparser.py to the Lib directory.
If you do a "cvs update" in the Lib directory, it will pop up there.
2000-03-29 16:02:45 +00:00
Guido van Rossum 84306246f1 Fix suggested by Magnus Kessler: in class Page, it is possible for
self.parser to be None; in that case don't dereference it in
getnames().
2000-03-28 20:10:39 +00:00
Guido van Rossum dc8b7980e0 Skip Montanaro:
The robotparser.py module currently lives in Tools/webchecker.  In
preparation for its migration to Lib, I made the following changes:

    * renamed the test() function _test
    * corrected the URLs in _test() so they refer to actual documents
    * added an "if __name__ == '__main__'" catcher to invoke _test()
      when run as a main program
    * added doc strings for the two main methods, parse and can_fetch
    * replaced usage of regsub and regex with corresponding re code
2000-03-27 19:29:31 +00:00
Fred Drake 70b5d47f71 From Sjoerd Mullender <sjoerd@oratrix.nl>:
cmp is not used in freeze, but is imported anyway.  What's worse, cmp
is no longer in the library, so freeze won't work like this.
2000-03-23 18:13:10 +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
Jeremy Hylton 36cc6a2197 complete rewrite
code generator uses flowgraph as intermediate representation.  the old
    rep uses a list with explicit "StackRefs" to indicate the target
    of jumps.

pyassem converts flowgraph to bytecode, breaks up individual steps of
    generating bytecode
2000-03-16 20:06:59 +00:00
Jeremy Hylton f635abee3a simplify visitor walker class
- remove postorder
- remove protocol for automatically walking children based on visitor
  method return value; now only walks if there is no method
2000-03-16 20:04:16 +00:00
Jeremy Hylton b631b8ede5 fix list.append problems 2000-03-16 20:03:04 +00:00
Jeremy Hylton e4d6293383 change name of Set method: items -> elements (avoids confusion with
dict)
2000-03-16 20:02:38 +00:00
Guido van Rossum 7f1cd296c6 Tim Peters writes:
Fix bad auto-indent I recently introduced when replacing the regexp that
could cause re to blow up:

    if or_any_other_block_opener:
        # one indenting comment line
            ^ cursor ended up at the caret (the bug)
        ^ but belongs here (the post-patch behavior)
2000-03-13 14:50:24 +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
Jeremy Hylton 329e4be05a a simple client-server framework for executing code in a different
process

not yet connected with IDLE
2000-03-09 19:56:50 +00:00
Barry Warsaw a17e0f1b61 A bunch of changes, primarily to command line argument parsing
(inspired by Detlef Lannert).  Specifically,

    -k/--keyword no longer takes an optional argument to clear the
    default keywords.  Instead, use -K/--no-default-keywords to clear
    them.

    -n/--add-location also no longer takes an optional argument to set
    the comment style.  Instead, use -S/--style to set the comment
    style to GNU or Solaris.

    -o/--output can take `-' as the filename, meaning write to
    standard output.

    The inputfile name can also be `-' meaning read from standard in.

A few other changes include

    Kludge to mark the file docstring as translatable.  Since the
    marking is to place _() around the docstring, and because we
    actually have to define the _() function before we use it, this
    means that we have to manually assign to __doc__ the output of
    _().  This doesn't seem too bad because you'll only use this idiom
    when translating a script's docstring (you really don't need to
    translate most module docstrings).

    Convert everything to string methods and do not import the string
    module.

    Bump the version number to 1.1
2000-03-08 15:18:35 +00:00
Guido van Rossum 9de988315a Override the Undo delegator to forbid any changes before the I/O mark.
It beeps if you try to insert or delete before the "iomark" mark.
This makes the shell less confusing for newbies.
2000-03-07 18:51:49 +00:00
Jeremy Hylton 6fbd1f85d9 replace : with = 2000-03-07 17:56:47 +00:00
Jeremy Hylton ae1f3bd7bd rename the global IdleConfParser object from IdleConf to idleconf
standard usage is now from IdleConf import idleconf
2000-03-07 17:56:27 +00:00
Jeremy Hylton 6b3edf0510 rename the global IdleConfParser object from IdleConf to idleconf
standard usage is now from IdleConf import idleconf

replace : with = in config.txt
2000-03-07 17:55:32 +00:00
Guido van Rossum ba23bed340 Tweak the goto file/line command (in the right button menu in PyShell
and output windows) so that it if it doesn't succeed with the line
at the cursor, it tries the line before that.  This is handy with
tracebacks, where my natural tendency is to click in the displayed
source line rather than in the file/line indicator just above it.
Now I can indulge this tendency.

I factored out a helper and changed the error handling so that a
non-existing file is treated as if the line didn't match -- this is
handy because some function calls (e.g. "foo.bar(1)") match the grep
pattern.
2000-03-07 16:25:11 +00:00
Guido van Rossum 801296c3b9 Added a bunch of TODO items that recently came up in the idle-dev list.
Also removed a bunch of items
2000-03-07 15:17:53 +00:00
Guido van Rossum fd6315ec7f If we're in the current input and there's only whitespace beyond the
cursor, erase that whitespace first.  This avoids a particularly
confusing case where hitting Return at the end of the command didn't
do what it was expected to do -- because it wasn't considered to be at
the end of the command.  Now it is.
2000-03-07 15:05:50 +00:00
Jeremy Hylton 0c3208aa62 compiler command-line interface moved here from compiler.pycodegen 2000-03-06 19:13:21 +00:00
Jeremy Hylton f728f9a13e import compile function form pycodegen 2000-03-06 19:12:33 +00:00
Jeremy Hylton 7fab23e9cb rename compile.py to pycodegen.py
fix imports
remove parse functions and visitor code
track name change: Classdef to Class

add some comments and tweak order of visitXXX methods

get rid of if __name__ == "__main__ section
2000-03-06 19:10:54 +00:00
Jeremy Hylton 8c78341f45 add a doc string
import some useful functions from contained modules
2000-03-06 19:04:14 +00:00
Jeremy Hylton 9812e7bc6a fix import to refer to compiler package 2000-03-06 18:54:30 +00:00
Jeremy Hylton abd7ebf70b revise arguments for addCode method on lnotab. take several numbers
that are internally converted to chars, rather than taking a string.
2000-03-06 18:53:14 +00:00
Jeremy Hylton fa974a9d06 change node Classdef to Class
add doc string to transformer module
add two helper functions:
    parse(buf) -> AST
    parseFile(path) -> AST
2000-03-06 18:50:48 +00:00
Jeremy Hylton ed9586174d factor out the tree walking/visitor code that was in compile.py 2000-03-06 18:49:31 +00:00
Guido van Rossum 9cb083b957 Defer all the work to idle.py, which has recently become too
complicated to copy in-line here.
2000-03-06 17:16:05 +00:00