Commit Graph

30 Commits

Author SHA1 Message Date
Fred Drake 10515b6483 main(): Move hackery of sys.argv until after the Tk instance has been
created.  This allows the application-specific Tkinter
         initialization to be executed if present.  Also pass an explicit
         className parameter to the Tk() constructor.

This closes SourceForge bug #110618.
2000-09-15 04:32:56 +00:00
Guido van Rossum fa6013cff0 Don't emit 8 lines of (c) information at startup -- use the same text
as main.c.
2000-09-05 13:51:14 +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 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 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 e81f28b630 migrate to use of IdleConf and config files to set options
idle.py:
    Load the config files before anything else happens
    XXX Need to define standard way to get files relative to the
       IDLE install dir

PyShell.py:
ColorDelegator.py:
    Get color defns out of IdleConf instead of IdlePrefs

EditorWindow.py:
    Replace hard-coded font & window size with config options
    Get extension names via IdleConf.getextensions

extend.py:
   Obsolete.  Extensions defined in config file.

ParenMatch.py:
   Use config file for extension options.
   Revise comment about parser requirements.
   Simplify logic on find returning None.
2000-03-03 23:06:45 +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 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 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 b6f8cf123e Rename History to IdleHistory.
Add isatty() to pseudo files.
1999-05-21 04:46:17 +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 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
Guido van Rossum 27f550cdd5 Nits: document use of $IDLESTARTUP; display idle version 1999-04-22 20:56:23 +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 7de697597e Color preferences code by Loren Luke (massaged by me somewhat) 1999-04-20 15:45:30 +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 8e47306b99 Add current dir or paths of file args to sys.path. 1999-02-01 23:06:17 +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 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 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
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 adfe773d2c Details for debugger interface. 1998-10-16 21:09:35 +00:00
Guido van Rossum 80d132deda Better debugger support (show stack etc). 1998-10-16 16:12:11 +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 1956352b08 Clear the linecache before printing a traceback 1998-10-13 16:32:05 +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 5af7a72d8b Subsume functionality from Popup menu in Debug menu.
Other stuff so the PyShell window can be resurrected from the Windows menu.
1998-10-12 23:59:27 +00:00
Guido van Rossum 3b4ca0ddad Initial checking of Tk-based Python IDE.
Features: text editor with syntax coloring and undo;
subclassed into interactive Python shell which adds history.
1998-10-10 18:48:31 +00:00