Commit Graph

1066 Commits

Author SHA1 Message Date
Guido van Rossum 8b4b46e4f3 Fix a bug reported by Toby Dickenson (on 18 May 1999).
Sometimes there's no parent, so don't try to get its __name__.
1999-11-02 15:46:44 +00:00
Guido van Rossum cfd76a202b Sjoerd Mullender:
Added some declarations to shut up compiler.
1999-11-02 15:44:40 +00:00
Barry Warsaw c4eb6a6afd main(): Arg! I wasn't properly ignoring EINVAL; now only re-raise the
exception if code <> errno.EINVAL.  Jeremy this should fix your
problem.
1999-10-07 20:00:01 +00:00
Guido van Rossum fa968ac35b Patches by Jack Jansen: new type OptionalInBuffer allows
passing either a string/input buffer or None.
1999-09-30 14:15:14 +00:00
Guido van Rossum 8bd738278e Patch by Jack Jansen to add with_ifdef option, which places #ifndef
around external decls.
1999-09-30 14:12:44 +00:00
Barry Warsaw d8d179d69d main(): wrap the device.setinfo() call around an exception handler.
It's possible to get a sunaudiodev.error (errno == EINVAL), although
I'm not exactly sure why, this at least won't crash the application.
1999-09-22 15:45:51 +00:00
Guido van Rossum 7f2c9d3890 A few new TODO entries. 1999-09-09 14:16:02 +00:00
Guido van Rossum 7f1fdfcdaf Add Python Documentation entry to Help menu. 1999-08-26 23:06:22 +00:00
Guido van Rossum 416b961be8 Find the help.txt file relative to __file__ or ".", not in sys.path.
(Suggested by Moshe Zadka, but implemented differently.)

Add <<python-docs>> event which, on Unix, brings up Netscape pointing
to http://www.python.doc/current/ (a local copy would be nice but its
location can't be predicted).  Windows solution TBD.
1999-08-26 23:06:05 +00:00
Guido van Rossum a8b37ad9ff Scrit by Marc-Andre Lemburg to generate htmlentitydefs.py. 1999-08-19 16:00:41 +00:00
Barry Warsaw 8a07baef80 Bump to version 1.1 1999-08-18 20:18:20 +00:00
Barry Warsaw 772d69676e __update(): Jeremy Hylton reports occurances of sunaudiodev.error
(interrupted system call) when getting the device information.  I've
never seen it, but this patch should take care of the problem.

If we get that exception and we're polling, just return since we'll
wake up again soon and get the right information.  If we're not
polling, try 4 times and then give up.
1999-08-18 20:17:42 +00:00
Barry Warsaw e27db5a393 Initial implementation 1999-08-13 20:59:48 +00:00
Barry Warsaw af5725104b Initial revision 1999-08-11 21:40:38 +00:00
Guido van Rossum aa6ed0c341 Moshe noticed an inconsistency in his comment, so I'm rephrasing it to
be clearer.
1999-08-11 14:55:43 +00:00
Guido van Rossum 292f2c53da Patch inspired by Moshe Zadka to search for the Icons directory in the
same directory as __file__, rather than searching for it along sys.path.
This works better when idle is a package.
1999-08-11 02:01:00 +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 aba953eceb New wishes. 1999-07-15 13:11:02 +00:00
Guido van Rossum 0d6bac67be Make the color for stderr red (i.e. the standard warning/danger/stop
color) rather than green.  Suggested by Sam Schulenburg.
1999-07-10 13:17:35 +00:00
Barry Warsaw 17a8b5d473 make_view_popups(): Catch import error which can occur if a viewer is
dynamically imported when Pynche is running via askcolor out of a
package.  If the ImportError occurs, try again, prepending the package
name and digging out the module.
1999-07-06 22:00:52 +00:00
Guido van Rossum 16e0bab4ab Close debugger when closing. This may break a cycle. 1999-06-25 17:26:34 +00:00
Guido van Rossum ba5a59c834 Break cycle on close. 1999-06-25 17:25:22 +00:00
Guido van Rossum 5af0df528d Destroy the tree when closing. 1999-06-25 17:08:19 +00:00
Guido van Rossum 30455f3050 Add destroy() method to recursively destroy a tree. 1999-06-25 17:07:57 +00:00
Guido van Rossum fed9b914b5 Extend _close() to break cycles.
Break some other cycles too (and destroy the root when done).
1999-06-25 16:09:27 +00:00
Guido van Rossum 205afb487a Add _close() method that does the actual cleanup (close() asks the
user what they want first if there's unsaved stuff, and may cancel).
It closes more than before.

Add unload_extensions() method to unload all extensions; called from
_close().  It calls an extension's close() method if it has one.
1999-06-25 16:06:29 +00:00
Guido van Rossum dd4dda87c1 Add close() method that breaks cycles. 1999-06-25 16:04:38 +00:00
Guido van Rossum 374c0dfb10 Add unregister() method.
Unregister everything at closing.
Don't call close() in __del__, rely on explicit call to close().
1999-06-25 16:03:19 +00:00
Guido van Rossum e689f0087e Add close() method that breaks a cycle. 1999-06-25 16:02:22 +00:00
Guido van Rossum ce7695191f Simplified version of a patch by Chih-Hao Huang, who wrote:
"""
When there are additional Setup files, specified by -e option of freeze,
checkextenstions.py assumes that *.o, *.a, -Lpath, and -Rpath are all
relative to where the Setup file is. select() inserts the path to the
Setup file to make them absolute. However, the assumption is not true.
There are cases that absolute paths are specified for them. The inserted
prefix, by select(), results in error.

The following fix check for absolute paths. The assumption is: an
absolute path begins with either '/' or '$'. In the latter case, it is
from the environmental variable. (Variables defined locally in the Setup
file have already been handled by expandvars())
"""

My version of the patch has been verified by Charles Waldman (a
colleague of Chih-Hao).
1999-06-23 21:37:57 +00:00
Guido van Rossum 43128905be Patch submitted by Toby Dickenson and approved by Mark Hammond.
Toby writes:

winmakemakefile.py tries to allow for spaces in the python install
path, by adding quotes around the appropriate filenames. It doesn't
quite get this correct; sometimes the quotes end up in the middle of
the path.

Microsoft's NMAKE version 6.0 is happy with this (!!!!)  unless there
is also a space in the name. I guess most users of freeze on windows
do not use the same path as the binary distribution.

I've tested the following changes on systems with and without a space
in the path.
1999-06-21 22:36:53 +00:00
Guido van Rossum 13205609c5 Tim Peters smart.patch:
EditorWindow.py:

+ Added get_tabwidth & set_tabwidth "virtual text" methods, that get/set the
widget's view of what a tab means.

+ Moved TK_TABWIDTH_DEFAULT here from AutoIndent.

+ Renamed Mark's get_selection_index to get_selection_indices (sorry, Mark,
but the name was plain wrong <wink>).

FormatParagraph.py:  renamed use of get_selection_index.

AutoIndent.py:

+ Moved TK_TABWIDTH_DEFAULT to EditorWindow.

+ Rewrote set_indentation_params to use new VTW get/set_tabwidth methods.

+ Changed smart_backspace_event to delete whitespace back to closest
preceding virtual tab stop or real character (note that this may require
inserting characters if backspacing over a tab!).

+ Nuked almost references to the selection tag, in favor of using
get_selection_indices.  The sole exception is in set_region, for which no
"set_selection" abstraction has yet been agreed upon.

+ Had too much fun using the spiffy new features of the format-paragraph
cmd.
1999-06-11 15:03:00 +00:00
Guido van Rossum 3dd3689215 Code by Mark Hammond to format paragraphs embedded in comments.
Read the comments (which I reformatted using the new feature :-)
for some limitations.
1999-06-10 17:48:02 +00:00
Guido van Rossum 85a36a5ff1 Added abstraction get_selection_index() (Mark Hammond). Also
reformatted some comment blocks to show off a cool feature I'm about
to check in next.
1999-06-10 17:43:17 +00:00
Guido van Rossum 4431b0f243 Adapt to the new pyclbr's support of listing top-level functions. If
this functionality is not present (e.g. when used with a vintage
Python 1.5.2 installation) top-level functions are not listed.

(Hmm...  Any distribution of IDLE 0.5 should probably include a copy
of the new pyclbr.py!)
1999-06-10 15:19:14 +00:00
Guido van Rossum e2571f2ce7 Fix off-by-one error in Tim's recent change to comment_region(): the
list of lines returned by get_region() contains an empty line at the
end representing the start of the next line, and this shouldn't be
commented out!
1999-06-10 14:44:48 +00:00
Guido van Rossum ea827e916c Mark Hammond writes: Here is another change that allows it to work for
class creation - tries to locate an __init__ function.  Also updated
the test code to reflect your new "***" change.
1999-06-10 14:20:26 +00:00
Guido van Rossum ab3b50b429 Mark Hammond writes: Tim's suggestion of copying the font for the
CallTipWindow from the text control makes sense, and actually makes
the control look better IMO.
1999-06-10 14:19:46 +00:00
Guido van Rossum 2073177e01 Append "..." if the appropriate flag (for varargs) in co_flags is set.
Ditto "***" for kwargs.
1999-06-09 20:34:57 +00:00
Guido van Rossum ab6a08a4b6 Hmm... Tim didn't turn "replace all" into a single undo block.
I think I like it better if it os, so here.
1999-06-08 13:06:07 +00:00
Guido van Rossum 9745f5a74f Tim Peters: made replacement atomic for undo/redo. 1999-06-08 12:54:56 +00:00
Guido van Rossum 0fcd635d41 Tim Peters:
+ Set usetabs=1.  Editing pyclbr.py was driving me nuts <0.6 wink>.
usetabs=1 is the Emacs pymode default too, and thanks to indentwidth !=
tabwidth magical usetabs disabling, new files are still created with tabs
turned off.  The only implication is that if you open a file whose first
indent is a single tab, IDLE will now magically use tabs for that file (and
set indentwidth to 8).  Note that the whole scheme doesn't work right for
PythonWin, though, since Windows users typically set tabwidth to 4; Mark
probably has to hide the IDLE algorithm from them (which he already knows).

+ Changed comment_region_event to stick "##" in front of every line.  The
"holes" previously left on blank lines were visually confusing (made it
needlessly hard to figure out what to uncomment later).
1999-06-08 12:54:23 +00:00
Guido van Rossum 3f75741844 Remove unnecessary reference to pyclbr from test() code. 1999-06-07 15:38:40 +00:00
Guido van Rossum 729afc1dff Tim Peters:
Smarter logic for finding a parse synch point.

Does a half to a fifth the work in normal cases; don't notice the speedup,
but makes  more breathing room for other extensions.

Speeds terrible cases by at least a factor of 10. "Terrible" == e.g. you put
""" at the start of Tkinter.py, undo it, zoom to the bottom, and start
typing in code.  Used to take about 8 seconds for ENTER to respond, now some
large fraction of a second.  The new code gets indented correctly, despite
that it all remains "string colored" until the colorizer catches up (after
which, ENTER appears instantaneous again).
1999-06-07 14:28:14 +00:00
Guido van Rossum febebe9e79 Might as well enable CallTips by default.
If there are too many complaints I'll remove it again or fix it.
1999-06-04 19:21:19 +00:00
Guido van Rossum f4a15089a3 New offerings by Tim Peters; he writes:
IDLE is now the first Python editor in the Universe not confused by my
doctest.py <wink>.

As threatened, this defines IDLE's is_char_in_string function as a
method of EditorWindow.  You just need to define one similarly in
whatever it is you pass as editwin to AutoIndent; looking at the
EditorWindow.py part of the patch should make this clear.
1999-06-03 14:32:16 +00:00
Guido van Rossum b10cb9a383 Enclose pattern in quotes in status message. 1999-06-03 14:25:49 +00:00
Guido van Rossum 23c115f1c9 Mark Hammond fixed some comments and improved the way the tip text is
constructed.
1999-06-03 12:07:50 +00:00
Guido van Rossum 094189f108 My fix to Mark's code: restore the universal check on <KeyRelease>.
Always cancel on <Key-Escape> or <ButtonPress>.
1999-06-02 18:18:57 +00:00
Guido van Rossum 6290dabdbb A version that Mark Hammond posted to the newsgroup. Has some newer
stuff for getting the tip.  Had to fix the Key-( and Key-) events
for Unix.  Will have to re-apply my patch for catching KeyRelease and
ButtonRelease events.
1999-06-02 18:12:55 +00:00
Guido van Rossum 85b9735768 Call tips by Mark Hammond (plus tiny fix by me.) 1999-06-02 16:10:19 +00:00
Guido van Rossum 1709041e73 Changes by Mark Hammond: (1) support optional output_sep argument to
the constructor so he can eliminate the sys.ps2 that PythonWin leaves
in the source; (2) remove duplicate history items.
1999-06-02 12:06:47 +00:00
Guido van Rossum 808fa4993e Changes by Mark Hammond to allow using IDLE extensions in PythonWin as
well: make three dialog routines instance variables.
1999-06-02 11:05:19 +00:00
Guido van Rossum d395aeeaa4 Change by Mark Hammond to allow using IDLE extensions in PythonWin as
well: make three dialog routines instance variables.
1999-06-02 11:04:29 +00:00
Guido van Rossum a954ba1d6c Hah! A fix of my own to Tim's code!
Unix bindings for <<toggle-tabs>> and <<change-indentwidth>> were
missing, and somehow that meant the events were never generated,
even though they were in the menu.  The new Unix bindings are now
the same as the Windows bindings (M-t and M-u).
1999-06-01 20:06:44 +00:00
Guido van Rossum bbaba85402 Tim Peters again:
The new version (attached) is fast enough all the time in every real module
I have <whew!>.  You can make it slow by, e.g., creating an open list with
5,000 90-character identifiers (+ trailing comma) each on its own line, then
adding an item to the end -- but that still consumes less than a second on
my P5-166.  Response time in real code appears instantaneous.

Fixed some bugs.

New feature:  when hitting ENTER and the cursor is beyond the line's leading
indentation, whitespace is removed on both sides of the cursor; before
whitespace was removed only on the left; e.g., assuming the cursor is
between the comma and the space:

def something(arg1, arg2):
                   ^ cursor to the left of here, and hit ENTER
               arg2):   # new line used to end up here
              arg2):    # but now lines up the way you expect

New hack:  AutoIndent has grown a context_use_ps1 Boolean config option,
defaulting to 0 (false) and set to 1 (only) by PyShell.  Reason:  handling
the fancy stuff requires looking backward for a parsing synch point; ps1
lines are the only sensible thing to look for in a shell window, but are a
bad thing to look for in a file window (ps1 lines show up in my module
docstrings often).  PythonWin's shell should set this true too.

Persistent problem:  strings containing def/class can still screw things up
completely.  No improvement.  Simplest workaround is on the user's head, and
consists of inserting e.g.

def _(): pass

(or any other def/class) after the end of the multiline string that's
screwing them up.  This is especially irksome because IDLE's syntax coloring
is *not* confused, so when this happens the colors don't match the
indentation behavior they see.
1999-06-01 19:55:34 +00:00
Guido van Rossum a6be3870b3 Tim Peters again:
[Tim, after adding some bracket smarts to AutoIndent.py]
> ...
> What it can't possibly do without reparsing large gobs of text is
> suggest a reasonable indent level after you've *closed* a bracket
> left open on some previous line.
> ...

The attached can, and actually fast enough to use -- most of the time.  The
code is tricky beyond belief to achieve that, but it works so far; e.g.,

        return len(string.expandtabs(str[self.stmt_start :
                                         ^ indents to caret
                                         i],
                                     ^ indents to caret
                                     self.tabwidth)) + 1
    ^ indents to caret

It's about as smart as pymode now, wrt both bracket and backslash
continuation rules.  It does require reparsing large gobs of text, and if it
happens to find something that looks like a "def" or "class" or sys.ps1
buried in a multiline string, but didn't suck up enough preceding text to
see the start of the string, it's completely hosed.  I can't repair that --
it's just too slow to reparse from the start of the file all the time.

AutoIndent has grown a new num_context_lines tuple attribute that controls
how far to look back, and-- like other params --this could/should be made
user-overridable at startup and per-file on the fly.
1999-06-01 19:52:34 +00:00
Guido van Rossum 8113cdc3a8 New file by Tim Peters:
One new file in the attached, PyParse.py.  The LineStudier (whatever it was
called <wink>) class was removed from AutoIndent; PyParse subsumes its
functionality.
1999-06-01 19:49:21 +00:00
Guido van Rossum d93f739556 Tim Peters keeps revising this module (more to come):
Removed "New tabwidth" menu binding.

Added "a tab means how many spaces?" dialog to block tabify and untabify.  I
think prompting for this is good now:  they're usually at-most-once-per-file
commands, and IDLE can't let them change tabwidth from the Tk default
anymore, so IDLE can no longer presume to have any idea what a tab means.

Irony:  for the purpose of keeping comments aligned via tabs, Tk's
non-default approach is much nicer than the Emacs/Notepad/Codewright/vi/etc
approach.
1999-06-01 19:47:56 +00:00
Guido van Rossum 74311b2c27 1. Catch NameError on import (could be raised by case mismatch on Windows).
2. No longer need to reset pyclbr cache and show watch cursor when calling
   ClassBrowser -- the ClassBrowser takes care of pyclbr and the TreeWidget
   takes care of the watch cursor.
3. Reset the focus to the current window after error message about class
   browser on buffer without filename.
1999-06-01 18:27:14 +00:00
Guido van Rossum 292dd2d1af Missed a few. 1999-06-01 18:23:19 +00:00
Guido van Rossum ec9cca776a Rewritten based on TreeWidget.py 1999-06-01 18:21:31 +00:00
Guido van Rossum 1ff48ec852 Object browser, based on TreeWidget.py. 1999-06-01 18:20:56 +00:00
Guido van Rossum 7419f4b290 Tree widget done right. 1999-06-01 18:19:17 +00:00
Guido van Rossum d3a518b661 As yet unused code for tool tips. 1999-06-01 18:19:02 +00:00
Guido van Rossum ee03611a8d Ensure sys.argv[0] is the script name on Run Script. 1999-06-01 18:18:27 +00:00
Guido van Rossum 96cf271be9 Move zoom height functionality to separate function. 1999-06-01 18:17:02 +00:00
Guido van Rossum 32465f4148 A few icons used by ../TreeWidget.py and its callers. 1999-06-01 15:04:51 +00:00
Guido van Rossum 8234dfcccb New version by Tim Peters improves block opening test. 1999-06-01 15:03:30 +00:00
Barry Warsaw a20fdcdd14 Eugene Dvurechenski <jno@glas.net> says:
there is "su" top level domain still maintained in ex-USSR.  at
    least "*.msk.su" zone (Moscow, USSR) is still in use.
1999-05-26 04:02:18 +00:00
Guido van Rossum b6f8cf123e Rename History to IdleHistory.
Add isatty() to pseudo files.
1999-05-21 04:46:17 +00:00
Guido van Rossum 945507edf6 Make initial stack viewer wider 1999-05-21 04:45:45 +00:00
Guido van Rossum 2092b439be New wishes 1999-05-21 04:45:20 +00:00
Guido van Rossum def2c96718 Much improved autoindent and handling of tabs,
by Tim Peters.
1999-05-21 04:38:27 +00:00
Guido van Rossum 318a70d976 Tim Peters writes:
I'm still unsure, but couldn't stand the virtual event trickery so tried a
different sin (adding undo_block_start/stop methods to the Text instance in
EditorWindow.py).  Like it or not, it's efficient and works <wink>.  Better
idea?

Give the attached a whirl.  Even if you hate the implementation, I think
you'll like the results.  Think I caught all the "block edit" cmds,
including Format Paragraph, plus subtler ones involving smart indents and
backspacing.
1999-05-03 15:49:52 +00:00
Guido van Rossum 2d6a568a0f Tim Peters writes:
[W]hile trying to dope out how redirection works, stumbled into two
possible glitches.  In the first, it doesn't appear to make sense to try to
rename a command that's already been destroyed; in the second, the name
"previous" doesn't really bring to mind "ignore the previous value" <wink>.
1999-05-03 15:38:56 +00:00
Barry Warsaw 85460a58f8 updates for latest release 1999-05-01 16:27:23 +00:00
Guido van Rossum 7238401488 Support for using idle as a package. 1999-04-30 19:39:25 +00:00
Guido van Rossum 78608120de Avoid listing files more than once (e.g. foomodule.so has two hits:
once for foo + module.so, once for foomodule + .so).
1999-04-30 15:14:05 +00:00
Barry Warsaw a4b055ff89 Add a scale widget and command line options to set the output volume.
Bump version number 1.0
1999-04-28 19:32:46 +00:00
Barry Warsaw 3369927322 Use the much nicer tkFileDialog for loading color name database files
(thanks Fred!)
1999-04-27 19:51:55 +00:00
Barry Warsaw a853adc110 Document that for askcolor(), databasefile and wantspec can now be set
on every invocation, instead of just the first.
1999-04-27 18:57:00 +00:00
Barry Warsaw 80d83e38ab askcolor(): databasefile and wantspec can now be set on every
invocation, instead of just the first.
1999-04-27 18:56:35 +00:00
Barry Warsaw 9af697b85d Implement dynamic external Viewer discovery.
PyncheWidget.__init__(): Add the extrapath argument which can be used
to pass in additional directories to search for Viewers.
1999-04-27 18:55:48 +00:00
Barry Warsaw f3ebf90d2c Add a module global variable ADDTOVIEW to conform to dynamic viewer
lookup protocol.
1999-04-27 18:54:12 +00:00
Barry Warsaw 2095b2fe14 Added docstring describing Viewer interface.
set_colordb(): Call Viewers' colordb_changed() method if they have
them.  Notifies them of changes to the color name database.
1999-04-27 18:53:29 +00:00
Barry Warsaw b61a28e240 add a comment 1999-04-27 18:43:47 +00:00
Barry Warsaw 7b2812211a When selecting a radio button in the TextViewer (to change a specific
text widget attribute), the color the attribute currently has is set
in the main widget.
1999-04-27 15:56:53 +00:00
Barry Warsaw f5e98572e5 Change Black/White button labels to not include the arrow 1999-04-27 15:56:02 +00:00
Barry Warsaw 74109a149e Describe namedcolors.txt 1999-04-26 23:50:04 +00:00
Barry Warsaw 3e9c75d3f2 An alternative Netscape database 1999-04-26 23:49:23 +00:00
Barry Warsaw a25223faf4 Describe how to load a new database 1999-04-26 23:48:17 +00:00
Barry Warsaw 821d8b73e8 Describe the Color database files 1999-04-26 23:46:25 +00:00
Barry Warsaw 6e7f6ea756 Put the 'File' menu on the menubar even when modal, so users can get
to the 'load palette' entry.   Just don't put the quit button on
there.
1999-04-26 23:36:47 +00:00
Barry Warsaw 3f01c724fd Tim Peter's sister's 140 named colors that NS and MSIE understand
(with some controversy surrounding AliceBlue :-)
1999-04-26 23:27:38 +00:00
Barry Warsaw a04988a8dd The "Web-safe" colors (all #rrggbb style) 1999-04-26 23:26:43 +00:00
Barry Warsaw 375b11635b The HTML 4.0 guaranteed colors. 1999-04-26 23:26:23 +00:00
Barry Warsaw d515a7ea3d Set the version number to 1.0 -- I think it's stable enough 1999-04-26 23:18:07 +00:00
Barry Warsaw 0604d72318 Lots of changes to support loading alternative color name database.
You can switch database by just loading the new one; the list window
and nearest colors adapt to the new database.

Some reorganizing of code.  Also, the name of the database file is
stored in the ~/.pynche pickle.  If it can't be loaded, fallbacks are
used.
1999-04-26 23:17:16 +00:00
Guido van Rossum 0ec1493d0b Some changes (maybe not enough?) to make it work on Windows with local
file URLs.
1999-04-26 23:11:46 +00:00
Guido van Rossum 26c2cb4bd1 Tim Peters strikes again:
Ho ho ho -- that's trickier than it sounded!  The colorizer is working with
"line.col" strings instead of Text marks, and the absolute coordinates of
the point of interest can change across the self.update call (voice of
baffled experience, when two quick backspaces no longer fooled it, but a
backspace followed by a quick ENTER did <wink>).

Anyway, the attached appears to do the trick.  CPU usage goes way up when
typing quickly into a long triple-quoted string, but the latency is fine for
me (a relatively fast typist on a relatively slow machine).  Most of the
changes here are left over from reducing the # of vrbl names to help me
reason about the logic better; I hope the code is a *little* easier to
1999-04-26 22:20:38 +00:00
Barry Warsaw c2aadcd96a Added /usr/lib/X11/rgb.txt in front of X/rgb.txt for Linuxers 1999-04-23 16:24:00 +00:00
Guido van Rossum 9dd52099fa Provide full arguments to __import__ so it works in packagized IDLE. 1999-04-23 14:01:25 +00:00
Guido van Rossum 06b787bdd1 Bunch of updates necessary due to recent changes; added docs for File
menu, command line and color preferences.
1999-04-22 23:20:17 +00:00
Guido van Rossum dc7bfc44a2 Remove obsolete 'script' menu. 1999-04-22 23:09:23 +00:00
Guido van Rossum 4c6d0c7382 Several wishes fulfilled. 1999-04-22 22:32:32 +00:00
Guido van Rossum 70f6d99753 Moved classes OnDemandOutputWindow and PseudoFile here,
from ScriptBinding.py where they are no longer needed.
1999-04-22 22:28:42 +00:00
Guido van Rossum 1f3de5d7b9 Mostly rewritten. Instead of the old Run module and Debug module,
there are two new commands:

Import module (F5) imports or reloads the module and also adds its
name to the __main__ namespace.  This gets executed in the PyShell
window under control of its debug settings.

Run script (Control-F5) is similar but executes the contents of the
file directly in the __main__ namespace.
1999-04-22 22:27:40 +00:00
Guido van Rossum 27f550cdd5 Nits: document use of $IDLESTARTUP; display idle version 1999-04-22 20:56:23 +00:00
Guido van Rossum e1e1488319 New version to celebrate new command line 1999-04-22 20:50:52 +00:00
Guido van Rossum 3d0ff00c08 Added flush(), for completeness. 1999-04-22 20:50:33 +00:00
Guido van Rossum eeb88076e7 A lot of changes to make the command line more useful. You can now do:
idle.py -e file ...    -- to edit files
  idle.py script arg ... -- to run a script
  idle.py -c cmd arg ... -- to run a command
Other options, see also the usage message (also new!) for more details:
  -d       -- enable debugger
  -s       -- run $IDLESTARTUP or $PYTHONSTARTUP
  -t title -- set Python Shell window's title
sys.argv is set accordingly, unless -e is used.
sys.path is absolutized, and all relevant paths are inserted into it.

Other changes:
- the environment in which commands are executed is now the __main__ module
- explicitly save sys.stdout etc., don't restore from sys.__stdout__
- new interpreter methods execsource(), execfile(), stuffsource()
- a few small nits
1999-04-22 20:49:35 +00:00
Guido van Rossum 9f5362bfa6 Some more TODO items. Made up my mind about command line args,
Run/Import, __main__.
1999-04-22 14:07:33 +00:00
Guido van Rossum e62e76c383 Super-elegant patch by Tim Peters that speeds up colorization
dramatically (up to 15 times he claims).  Works by reading more than
one line at a time, up to 100-line chunks (starting with one line and
then doubling up to the limit).  On a typical machine (e.g. Tim's
P5-166) this doesn't reduce interactive responsiveness in a noticeable
way.
1999-04-22 13:38:40 +00:00
Guido van Rossum da4b25e0d9 Patch by Tim Peters to speed up colorizing of big multiline strings. 1999-04-21 15:49:34 +00:00
Guido van Rossum 79d4398c30 For an event 'foo-bar', the corresponding method must be called
foo_bar_event().  Therefore, fix the references to zoom_height() in
the example.
1999-04-20 17:32:52 +00:00
Guido van Rossum a670d0c97b Restored the original IDLE color scheme. 1999-04-20 15:58:29 +00:00
Guido van Rossum 7de697597e Color preferences code by Loren Luke (massaged by me somewhat) 1999-04-20 15:45:30 +00:00
Guido van Rossum cfb819ee51 Patch by Mark Favas: it fixes the search engine behaviour where an
unsuccessful search wraps around and re-searches that part of the file
between the start of the search and the end of the file - only really
an issue for very large files, but... (also removes a redundant
m.span() call).
1999-04-20 15:00:00 +00:00
Guido van Rossum 0a2818fe5b A few wishes are now fulfilled. 1999-04-19 16:26:02 +00:00
Guido van Rossum 17c516eacb Tim Peters implements some of my wishes:
o Makes the tab key intelligently insert spaces when appropriate (see Help
list banter twixt David Ascher and me; idea stolen from every other editor
on earth <wink>).

o newline_and_indent_event trims trailing whitespace on the old line (pymode
and Codewright).

o newline_and_indent_event no longer fooled by trailing whitespace or
comment after ":" (pymode, PTUI).

o newline_and_indent_event now reduces the new line's indentation after
return, break, continue, raise and pass stmts (pymode).

The last two are easy to fool in the presence of strings & continuations,
but pymode requires Emacs's high-powered C parsing functions to avoid that
in finite time.
1999-04-19 16:23:15 +00:00
Guido van Rossum dcb0a57874 Avoid totally empty files. 1999-04-10 14:00:28 +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 21ad59f1ee # TODO entries changed 1999-04-08 20:28:42 +00:00
Guido van Rossum 00b6d0f224 New change log. 1999-04-07 18:43:22 +00:00
Guido van Rossum a2ca434cfc New version. 1999-04-07 18:41:59 +00:00
Guido van Rossum a99c5db3aa Version bump awaiting impending new release.
(Not much has changed :-( )
1999-04-07 18:27:29 +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 825df2a14d At Tim Peters' recommendation, add a dummy flush() method to PseudoFile. 1999-03-29 14:52:28 +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
Barry Warsaw ecb1a65f63 Helpwin.__init__(): The text widget should get focus. 1999-03-26 16:11:40 +00:00
Barry Warsaw 61ba0721db Removed unnecessary import `from PyncheWidget import PyncheWidget' 1999-03-26 15:59:51 +00:00
Guido van Rossum 545006259d Added Samuel Bayer's new webchecker.
Unfortunately his code breaks wcgui.py in a way that's not easy
to fix.  I expect that this is a temporary situation --
eventually Sam's changes will be merged back in.
(The changes add a -t option to specify exceptions to the -x
option, and explicit checking for #foo style fragment ids.)
1999-03-24 19:09:00 +00:00
Guido van Rossum c7e7c60756 New mixin class that defines cmp and hash that use
the ob_itself pointer.  This allows (when using the mixin)
different Python objects pointing to the same C object and
behaving well as dictionary keys.

Or so sez Jack Jansen...
1999-03-15 16:37:54 +00:00
Guido van Rossum 7039f50828 Bug submitted by Wayne Knowles, who writes:
Under Windows, python freeze.py -o hello hello.py
   creates all the correct files in the hello subdirectory, but the
   Makefile has the directory prefix in it for frozen_extensions.c
   nmake fails because it tries to locate hello/frozen_extensions.c

(His fix adds a call to os.path.basename() in the appropriate place.)
1999-03-12 22:07:05 +00:00
Guido van Rossum dd58416f39 Don't crash when sys.path contains an empty string. 1999-03-11 23:21:23 +00:00
Guido van Rossum 49c7bc416e This file was never supposed to be part of IDLE. 1999-03-11 16:51:23 +00:00
Guido van Rossum b62e877631 - Don't crash in the case where a superclass is a string instead of a
pyclbr.Class object; this can happen when the superclass is
unrecognizable (to pyclbr), e.g. when module renaming is used.

- Show a watch cursor when calling pyclbr (since it may take a while
recursively parsing imported modules!).
1999-03-11 16:37:13 +00:00
Guido van Rossum d6e8713f81 Add PathBrowser to File module 1999-03-10 05:18:02 +00:00
Guido van Rossum a917af7fc7 "Path browser" - 4 scrolled lists displaying:
directories on sys.path
    modules in selected directory
    classes in selected module
    methods of selected class

Sinlge clicking in a directory, module or class item updates the next
column with info about the selected item.  Double clicking in a
module, class or method item opens the file (and selects the clicked
item if it is a class or method).

I guess eventually I should be using a tree widget for this, but the
ones I've seen don't work well enough, so for now I use the old
Smalltalk or NeXT style multi-column hierarchical browser.
1999-03-10 05:17:28 +00:00
Guido van Rossum dc424be5af New utility: multiple scrolled lists in parallel 1999-03-10 05:13:29 +00:00
Guido van Rossum ac1cb16efb - White background.
- Display "(None)" (or text of your choosing) when empty.
- Don't set the focus.
1999-03-10 05:10:49 +00:00
Guido van Rossum d2cd6f8c93 Small change by Jack Jansen.
Test for self.returntype behaving like OSErr rather than being it.
1999-03-09 16:05:26 +00:00
Guido van Rossum b0f99a62d7 Comment out confusing write call. 1999-02-18 14:22:05 +00:00
Guido van Rossum a89b98f4c0 News in 0.3. 1999-02-17 22:47:41 +00:00
Guido van Rossum dce019ed79 Bump version to 0.3. 1999-02-17 17:37:24 +00:00
Guido van Rossum 8f2918f4fa After all, we don't need to call the callbacks ourselves! 1999-02-17 17:34:58 +00:00
Guido van Rossum be5f2f1cb5 When deleting, call the callbacks *after* deleting the window from our list! 1999-02-17 17:34:25 +00:00
Guido van Rossum c4f752f803 Fix up the Windows menu via the new callback mechanism instead of
depending on menu post commands (which don't work when the menu is
torn off).
1999-02-17 17:20:50 +00:00
Guido van Rossum 5437ddfa36 Support callbacks to patch up Windows menus everywhere. 1999-02-17 17:19:37 +00:00
Guido van Rossum a79a93ff73 Oh, why not. Checking in the Emacs-generated change log. 1999-02-17 16:20:08 +00:00
Guido van Rossum a0d5d700e0 # Accidentally checked in a test version of this file with a bogus
# "import fooblurg" :-)
1999-02-16 23:05:46 +00:00
Guido van Rossum 9ea32898db Only pop up the stack viewer when requested in the Debug menu. 1999-02-16 22:34:17 +00:00
Guido van Rossum d14e97378b Clarify how EXAMPLE.py is to be used ("python EXAMPLE.py", not
"python modulator.py EXAMPLE.py") and that it's only there in case
you don't have Tkinter.
1999-02-16 17:19:39 +00:00
Guido van Rossum ec119a3fc9 Don't crash if a window no longer exists. 1999-02-08 22:27:49 +00:00
Guido van Rossum 5ec13c5318 Restructured a bit. 1999-02-08 22:27:18 +00:00
Guido van Rossum 8e47306b99 Add current dir or paths of file args to sys.path. 1999-02-01 23:06:17 +00:00
Guido van Rossum 2e9e0dfca3 Add canonic() function -- for brand new bdb.py feature. 1999-02-01 19:35:33 +00:00
Guido van Rossum 14b2d30b11 Protect against accessing an empty stack. 1999-02-01 19:34:53 +00:00
Guido van Rossum 38a5a3b3f1 Use only the height to decide whether to zoom in or out. 1999-01-29 20:44:45 +00:00
Guido van Rossum b7ebb83ad0 Make sure the Tcl variables are shared between windows. 1999-01-28 22:24:30 +00:00
Guido van Rossum 07ec896707 Move menu/key binding code from Bindings.py to EditorWindow.py,
with changed APIs -- it makes much more sense there.
Also add a new feature: if the first character of a menu label is
a '!', it gets a checkbox.  Checkboxes are bound to Boolean Tcl variables
that can be accessed through the new getvar/setvar/getrawvar API;
the variable is named after the event to which the menu is bound.
1999-01-28 22:02:47 +00:00
Guido van Rossum 85ef9dce9f Add Quit button to the debugger window. 1999-01-28 22:00:30 +00:00
Guido van Rossum 959c937382 When find_again() finds exactly the current selection, it's a failure. 1999-01-28 19:04:01 +00:00
Guido van Rossum 3d58bcd5d9 Rename idle -> idle.py 1999-01-28 18:50:31 +00:00
Guido van Rossum 36911a1ca9 Only deiconify when iconic. 1999-01-18 15:18:57 +00:00
Guido van Rossum f87240f447 Misc 1999-01-18 15:18:34 +00:00
Guido van Rossum 894ee6f668 Renamed test.py to testcode.py so one can import Python's
test package from inside IDLE.  (Suggested by Jack Jansen.)
1999-01-12 22:14:34 +00:00
Guido van Rossum 5051f4f80d Hack to close a window that is colorizing. 1999-01-12 22:09:57 +00:00
Guido van Rossum 5cc3129260 Vladimir Marangozov's patch:
The separator dances too much and seems to jump by arbitrary amounts
in arbitrary directions when I try to move it for resizing the frames.
This patch makes it more quiet.
1999-01-12 22:09:18 +00:00
Guido van Rossum c66e860418 Some requests have been fulfilled. 1999-01-11 14:52:40 +00:00
Guido van Rossum 245ddc4b88 Set the cursor to a watch when opening the class browser (which may
take quite a while, browsing multiple files).

Newer, better center() -- but assumes no wrapping.
1999-01-11 14:51:32 +00:00
Guido van Rossum b287b3ad1b Got rid of debug print statement in goto_line_event(). 1999-01-11 14:49:00 +00:00
Guido van Rossum d5c8497a81 I think I like it better if it prints the traceback even when it displays
the stack viewer.
1999-01-11 14:47:54 +00:00
Guido van Rossum 9016fcf41c Bind ESC to close-window. 1999-01-11 14:46:55 +00:00
Guido van Rossum dc5066ee81 Use a HSeparator between the classes and the items.
Make the list of classes wider by default (40 chars).
Bind ESC to close-window.
1999-01-11 14:46:06 +00:00
Guido van Rossum d5f038098a Separator classes (draggable divider between two panes). 1999-01-11 14:45:11 +00:00
Guido van Rossum 2403b0c5d4 Don't traceback when wakeup() is called when the window has been destroyed.
This can happen when a torn-of Windows menu references closed windows.
And Tim Peters claims that the Windows menu is his favorite to tear off...
1999-01-09 22:01:33 +00:00
Guido van Rossum f52cca9812 Allow tearing off of the Windows menu. 1999-01-09 22:00:10 +00:00
Guido van Rossum 0291d1d1d6 Close on ESC. 1999-01-09 21:58:11 +00:00
Guido van Rossum dd0d335758 Updated a bunch of things (it was mostly still 0.1!) 1999-01-09 21:57:56 +00:00
Guido van Rossum 83c74d44ce Added ScriptBinding to standard bindings. 1999-01-09 05:00:59 +00:00
Guido van Rossum 9f42584907 This now actually works. See doc string. It can run a module (i.e.
import or reload) or debug it (same with debugger control).  Output
goes to a fresh output window, only created when needed.
1999-01-09 05:00:17 +00:00
Guido van Rossum b33f612f33 What's new in this release. 1999-01-08 17:26:02 +00:00
Guido van Rossum 38df3c383d Paul Prescod's patches to allow the stack viewer to pop up when a
traceback is printed.
1999-01-08 15:31:07 +00:00
Guido van Rossum 629082edd6 Change paragraph width limit to 70 (like Emacs M-Q). 1999-01-07 00:12:15 +00:00
Guido van Rossum 2927e7891f Separating TODO from README. Slight reformulation of features. No
exact release date.
1999-01-07 00:11:29 +00:00
Guido van Rossum 6ba219e975 Separating TODO from README. 1999-01-07 00:10:00 +00:00
Guido van Rossum 1e899cdeaa Hm. There was a boundary condition error at the end of the file too. 1999-01-04 21:19:09 +00:00
Guido van Rossum 4eac47cf50 Hm. Add Unix binding for replace, too. 1999-01-04 21:18:40 +00:00
Guido van Rossum 906572a06d Ran eventparse.py again. 1999-01-04 16:35:02 +00:00
Guido van Rossum e911c3e20c Added Unix Meta-q key binding;
fix find_paragraph when at start of file.
1999-01-04 16:34:41 +00:00
Guido van Rossum 16b91f89b5 Added Meta-/ binding for Unix as alt for Alt-/. 1999-01-04 16:32:21 +00:00
Guido van Rossum 5bfffbd79d Add unix binding for grep (otherwise the menu entry doesn't work!) 1999-01-04 16:32:04 +00:00
Guido van Rossum 1ae3f89611 Adjusted Unix height to work with fvwm96. :=( 1999-01-04 16:31:31 +00:00
Guido van Rossum d53869ea33 Need to import sys! 1999-01-04 15:52:33 +00:00
Guido van Rossum f903898fff Formatted some paragraphs 1999-01-04 13:05:58 +00:00
Guido van Rossum 94e82ceeac Add new extension to reformat a (text) paragraph. 1999-01-04 13:04:54 +00:00
Guido van Rossum 46facd1bac Typo in Win specific height setting. 1999-01-04 12:23:46 +00:00
Guido van Rossum 909bc18188 Recover from failed saves; when a file turns out to be a directory,
create a directory and moer the original file to the index.html.
1999-01-03 13:06:00 +00:00
Guido van Rossum 33f2b7b257 Added something like Tim Peters' backspace patch. 1999-01-03 00:47:35 +00:00
Guido van Rossum 0c65e2504e Adapted to Unix (i.e., more hardcoded constants). 1999-01-03 00:47:07 +00:00
Guido van Rossum 504b0bf066 Checking in IDLE 0.2.
Much has changed -- too much, in fact, to write down.
The big news is that there's a standard way to write IDLE extensions;
see extend.txt.  Some sample extensions have been provided, and
some existing code has been converted to extensions.  Probably the
biggest new user feature is a new search dialog with more options,
search and replace, and even search in files (grep).

This is exactly as downloaded from my laptop after returning
from the holidays -- it hasn't even been tested on Unix yet.
1999-01-02 21:28:54 +00:00
Barry Warsaw c0ef565cdf D.M. Pick gives me a more accurate distillation of his `uk' explanation :-) 1998-12-29 02:52:11 +00:00
Barry Warsaw a2b38030d6 Update on history of `uk' top level, greatly condensed from David
Pick's emailed account.
1998-12-27 20:08:49 +00:00
Guido van Rossum 2d3b0d725a Provide more detail when the commit button is not shown. 1998-12-23 21:33:09 +00:00
Guido van Rossum fdd302820e Fix for modulefinder so that it prints all modules an unknown module
was referenced in instead of only the last.  (Sjoerd Mullender)
1998-12-22 13:44:01 +00:00
Guido van Rossum 654387efbd Fix the class browser to work even when the file is not on sys.path. 1998-12-18 15:52:54 +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 38b92eb56a Sjoerd Mullender:
When printing missing modules, also print the module they were
imported from.
1998-12-15 15:35:23 +00:00
Barry Warsaw ef30092207 Added most of the mechanism to change the strips from color variations
to color constants (i.e. red constant, green constant, blue
constant).  But I haven't hooked this up yet because the UI gets more
crowded and the arrows don't reflect the correct values.

Added "Go to Black" and "Go to White" buttons.
1998-12-15 01:04:38 +00:00
Barry Warsaw 6403991a9d A start on the TestModExp applet
"Author" => "Contact"
1998-12-15 01:02:51 +00:00
Barry Warsaw 88604056c5 "Author" -> "Contact" 1998-12-14 21:36:40 +00:00
Guido van Rossum e6360fab2c Moved to Python 1.5.2/Lib 1998-12-08 20:39:36 +00:00
Barry Warsaw 08833f2a6d intermediate 1998-12-05 22:19:06 +00:00
Barry Warsaw e1425d6a33 Fixed some bugs 1998-12-05 22:07:24 +00:00
Barry Warsaw 93ec4cc6f4 Fixed typos in --dump 1998-12-05 21:15:41 +00:00
Barry Warsaw ce0bbd270b Added Helpwin -- help in a text widget 1998-12-03 19:50:24 +00:00
Barry Warsaw eb6b9b7ebb Untabification and other cruft 1998-12-03 19:49:45 +00:00
Barry Warsaw d0e1e51385 docstring(): Function for returning __doc__ % globals() 1998-12-03 19:49:13 +00:00
Barry Warsaw f622a33b29 audiopy: slightly revamped UI... includes a menubar, no quit button,
and added a `Help' menu item that puts the README (or docstring if
that can't be found) in a scrolling text widget.

README: fixed a few nits
1998-12-03 19:32:38 +00:00
Barry Warsaw 53646881f3 Initial version of the README file 1998-12-03 16:27:38 +00:00
Guido van Rossum 0903f2a36d Typo 1998-11-27 03:19:20 +00:00
Guido van Rossum b5eed0328f Support underlining of menu labels 1998-11-27 03:19:07 +00:00
Guido van Rossum 6e0a413693 New approach, separate tables for menus (platform-independent) and key
definitions (platform-specific), and generating accelerator strings
automatically from the key definitions.
1998-11-27 03:17:49 +00:00
Barry Warsaw 3fe1b14c96 A little more tweakage 1998-11-18 03:45:09 +00:00
Barry Warsaw 2858b43613 A little more tweakage 1998-11-18 03:32:43 +00:00
Barry Warsaw d81d534aef A bit of tweakage of the --help and --version options 1998-11-18 03:28:45 +00:00
Barry Warsaw 615a66a5ef (ChipViewer): Make frame sticky NSEW to fix geometry problem. 1998-11-18 03:15:19 +00:00
Barry Warsaw 93990de252 tweak version number 1998-11-18 03:09:18 +00:00
Barry Warsaw f79b7e274c Update 1998-11-18 00:27:14 +00:00
Barry Warsaw e882b8a92e Updating 1998-11-18 00:21:09 +00:00
Guido van Rossum 72fe0859d0 Clarify portability and main program. 1998-11-16 18:37:42 +00:00
Guido van Rossum a017777bd4 Added intro for 0.1 release and append Grail notes. 1998-11-16 18:34:26 +00:00
Barry Warsaw 441abb4c8f Added a None button to turn off all input sources. 1998-11-02 22:48:56 +00:00
Barry Warsaw d55049aede If the module SUNAUDIODEV was generated on an older version of
Solaris, the `CD' macro won't exist in the header file, so this will
raise a NameError.
1998-11-01 07:17:24 +00:00
Barry Warsaw 9ade9ddb14 MainWindow.__init__(): Move the import of Tkinter to here so that
command line operation is (much) faster.
1998-11-01 07:13:14 +00:00
Barry Warsaw 3febc2443c Added a version number, --version, and updated the docstring. 1998-11-01 07:10:51 +00:00
Barry Warsaw e77ec175d2 Rewrite, simplification of command line option parsing. Many GUI
fixes.  Input sources are mutually exclusive.
1998-11-01 07:03:55 +00:00
Barry Warsaw 2c8b35bdd2 some rewriting, must do command line args 1998-10-31 00:25:14 +00:00
Barry Warsaw b7d1d63f00 Input stuff 1998-10-30 23:45:41 +00:00
Barry Warsaw 2a06084ed5 Added command line options 1998-10-30 18:21:52 +00:00
Barry Warsaw 11b7ae5121 Initial revision 1998-10-30 16:22:18 +00:00
Guido van Rossum 4089c110a1 root is now a global called _root 1998-10-26 18:49:00 +00:00
Guido van Rossum d4103883f3 Raise the root window on reset().
Different action on WM_DELETE_WINDOW is more likely to do the right thing,
allowing us to destroy old windows.
1998-10-24 16:38:38 +00:00
Guido van Rossum 5ac15bc9c8 Split the goto() function in two: _goto() is the internal one,
using Canvas coordinates, and goto() uses turtle coordinates
and accepts variable argument lists.
1998-10-24 16:29:21 +00:00
Guido van Rossum a96c2d407b Cope with destruction of the window 1998-10-24 14:03:48 +00:00
Guido van Rossum 3fbe67abd1 Turtle graphics 1998-10-24 05:46:37 +00:00
Guido van Rossum 39926e4bba Use of Breakpoint class should be bdb.Breakpoint. 1998-10-24 01:28:22 +00:00
Barry Warsaw cf1daad891 Brief update on the slightly changed API of pyColorChooser.askcolor().
Added a To Do list.
1998-10-22 19:00:38 +00:00
Barry Warsaw 2be858230a __init__(): Removed initialcolor keyword.
show(): added color keyword here so that the selected color can be
chosen on each invocation of askcolor().

Also fixed this class, and askcolor() so that the same Chooser
instance can be re-used instead of creating a new one on each
invocation of askcolor().

Added a module function save() which can be used to explicitly save
the option database in ~/.pynche.  This does not happen automatically
when used as a modal.
1998-10-22 18:51:22 +00:00
Barry Warsaw f72d580d5e sticky should be NSEW to fix pixel weirdness at right edge 1998-10-22 18:48:45 +00:00
Barry Warsaw 4ab5ae2ad0 Error message goes to stderr
canceled() takes an optional flag so that the canceled flag can be
cleared.
1998-10-22 18:48:01 +00:00
Barry Warsaw d9e5214c26 beep => bell
deiconify(): New method
1998-10-22 18:46:28 +00:00
Barry Warsaw 877d299292 Fixed running of standalone via command line. Also, only do save from
main() so that run-as-modal doesn't automatically save database.
1998-10-22 18:45:52 +00:00
Barry Warsaw 3dd1c39c80 Describe all the new features 1998-10-22 04:14:24 +00:00
Barry Warsaw a20f6af862 Chooser.__init__(): Added `wantspec' keyword to conform exactly to
tkColorChooser.askcolor() interface (i.e. don't return a color name
even if there is an exact match).
1998-10-22 03:44:52 +00:00
Barry Warsaw ca07ba00ac Many changes to support a second mode of operation. Pynche can now be
run either as a standalone application (by running pynche or
pynche.pyw), or as a modal dialog inside another application.  This
can be done by importing pyColorChooser and running askcolor().  The
API for this is the same as the tkColorChooser.askcolor() API, namely:

    When `Okay' is hit, askcolor() returns ((r, g, b), "name").  When
    `Cancel' is hit, askcolor() returns (None, None).

Note the following differences:

    1. pyColorChooser.askcolor() takes an optional keyword `master'
       which if set tells Pynche to run as a modal dialog.  `master'
       is a Tkinter parent window.  Without the `master' keyword
       Pynche runs standalone.

    2. in pyColorChooser.askcolor() will return a Tk/X11 color name as
       "name" if there is an exact match, otherwise it will return a
       color spec, e.g. "#rrggbb".  tkColorChooser can't return a
       color name.

There are also some UI differences when running standalone vs. modal.
When modal, there is no "File" menu, but instead there are "Okay" and
"Cancel" buttons.

The implementation of all this is a bit of a hack, but it seems to
work moderately well.  I'm not guaranteeing the pyColorChooser.Chooser
class has the same semantics as the tkColorChooser.Chooser class.
1998-10-22 03:25:59 +00:00
Barry Warsaw 8a09e1ccda Saving/Restoring state into ~/.pynche file 1998-10-20 20:45:46 +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 7b9bb05df9 Speed up the search a bit -- don't drag a mark around... 1998-10-19 03:33:40 +00:00
Guido van Rossum cc0ade8cd5 Change our special entries from <console#N> to <pyshell#N>.
Patch linecache.checkcache() to keep our special entries alive.
Add popup menu to all editor windows to set a breakpoint.
1998-10-19 02:26:16 +00:00
Guido van Rossum b52cfa1d97 Use and pass through the 'force' flag to set_dict() where appropriate.
Default source and globals checkboxes to false.
Don't interact in user_return().
Add primitive set_breakpoint() method.
1998-10-19 02:24:40 +00:00
Guido van Rossum 6c5baeb6df Raise priority of 'sel' tag so its foreground (on Windows) will take
priority over text colorization (which on Windows is almost the
same color as the selection background).

Define a tag and color for breakpoints ("BREAK").
1998-10-19 02:22:41 +00:00
Guido van Rossum 0737430bf8 Disable "Open stack viewer" and "help" commands. 1998-10-19 02:20:30 +00:00
Guido van Rossum 105b9c7de4 Add optional 'force' argument (default 0) to load_dict().
If set, redo the display even if it's the same dict.
1998-10-19 02:19:30 +00:00
Barry Warsaw f3dcafecd3 The driver script on Unix is `pynche'; for Windows `pynche.pyw' 1998-10-16 22:29:18 +00:00
Guido van Rossum 179c36e411 Do nothing when loading the same dict as before. 1998-10-16 21:10:12 +00:00
Guido van Rossum adfe773d2c Details for debugger interface. 1998-10-16 21:09:35 +00:00
Guido van Rossum 3fb3515303 Restructured and more consistent. Save checkboxes across instantiations. 1998-10-16 21:09:05 +00:00
Guido van Rossum baf53b4ea8 Get rid of conflicting ^X binding. Use ^W. 1998-10-16 20:08:34 +00:00
Guido van Rossum 5188a25efe Debugger can now show local and global variables. 1998-10-16 18:59:39 +00:00
Guido van Rossum 6b384833f3 Oops 1998-10-16 17:16:59 +00:00
Guido van Rossum 80d132deda Better debugger support (show stack etc). 1998-10-16 16:12:11 +00:00
Guido van Rossum 92a67d7847 Follow renames in StackViewer module 1998-10-16 16:11:08 +00:00
Guido van Rossum 88d9007038 Rename classes to StackViewer (the widget) and StackBrowser (the toplevel). 1998-10-16 16:10:45 +00:00
Guido van Rossum 95ef4982ed Add close() method 1998-10-16 16:10:09 +00:00
Guido van Rossum e1dedc096e Clarify 'Open Module' dialog text 1998-10-16 16:09:57 +00:00
Guido van Rossum 04430793ed Restructured into a browser and a widget. 1998-10-16 04:02:28 +00:00
Guido van Rossum e6fae1cbca Generalized the scrolled list which is the base for the class and
method browser into a separate class in its own module.
1998-10-15 23:27:08 +00:00
Guido van Rossum 99d3c48772 Cosmetic change 1998-10-15 14:08:20 +00:00
Guido van Rossum b7ffca393f Don't show function name if there is none 1998-10-15 12:18:49 +00:00
Barry Warsaw 840a84d37a Updated __main__ unit test 1998-10-15 02:18:08 +00:00
Guido van Rossum 35e55da7dc Polish the Debugger GUI a bit.
Closing it now also does the right thing.
1998-10-14 03:43:05 +00:00
Guido van Rossum 35f7542e83 Ad primitive debugger interface (so far it will step and show you the
source, but it doesn't yet show the stack).
1998-10-13 23:51:13 +00:00
Guido van Rossum f035d3bfe1 Misc 1998-10-13 23:49:55 +00:00
Guido van Rossum ad24ae10df Whoops -- referenced self.top before it was set. 1998-10-13 20:00:02 +00:00
Guido van Rossum 423938a852 Added history and completion commands. 1998-10-13 17:38:03 +00:00
Guido van Rossum ca5619cc5b Updated 1998-10-13 17:32:27 +00:00
Guido van Rossum 7895562f88 Add class browser functionality. 1998-10-13 16:32:44 +00:00
Guido van Rossum ae08d3897a Add a close() method and bind to WM_DELETE_WINDOW protocol 1998-10-13 16:32:29 +00:00
Guido van Rossum 1956352b08 Clear the linecache before printing a traceback 1998-10-13 16:32:05 +00:00
Guido van Rossum 49c1a7ebc2 Added class browser binding. 1998-10-13 16:31:46 +00:00
Guido van Rossum 7f5c9ef5fd Much improved, much left to do. 1998-10-13 16:31:03 +00:00
Guido van Rossum 3f08d40bd8 Make the return key do what I mean more often. 1998-10-13 15:21:41 +00:00
Guido van Rossum 4650df96bf Make the return key do what I mean more often. 1998-10-13 14:41:27 +00:00
Guido van Rossum 439c467a0c Adding the beginnings of a Class browser. Incomplete, yet. 1998-10-13 03:59:57 +00:00