summaryrefslogtreecommitdiffstats
path: root/Tools/idle/TODO.txt
blob: e33a6f0f357f38f2be5d2f8a8ffb78beb14453d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155

TO DO:

- improve debugger:
    - manage breakpoints globally, allow bp deletion, tbreak, cbreak etc.
    - real object browser
    - help on how to use it (a simple help button will do wonders)
    - performance?  (updates of large sets of locals are slow)
    - better integration of "debug module"
- insert the initial current directory into sys.path
- default directory attribute for each window instead of only for windows
  that have an associated filename
- "GO" commands (execute whole buffer, selection, current line
  in the context of the Python Shell window)
  Rename Run -> Import, Go -> Run (like Pythonwin)
- module __name__ should be '__main__' in console
- when reopening the shell window, the old __main__ module's contents
  should still be there
- output from module execution should go to Python Shell
- command expansion from keywords, module contents, other buffers, etc.
- "Recent documents" menu item
- Filter region command
- more emacsisms:
    - parentheses matching
    - M-[, M-] to move by paragraphs
    - incremental search?
    - ^K should cut to buffer
- restructure state sensitive code to avoid testing flags all the time
- persistent user state (e.g. window and cursor positions, bindings)
- make backups when saving
- check file mtimes at various points
- interface with RCS/CVS/Perforce ???
- status bar?
- better help?
- don't open second class browser on same module (nor second path browser)
- unify class and path browsers
- use a tree widget instead of a smalltalk/NeXT style multicolumn browser
- Make command line behave more like the standard Python interpreter:
    idle.py -- starts interactive shell
    idle.py script.py arg ... -- runs script as main
    idle.py -i script.py arg ... -- runs script as main, then interactive shell
    idle.py -e file ... -- edit files
    idle.py -i -e file ... -- edit files and pop up interactive shell
    idle.py -c cmd arg ... -- run command
    idle.py -i -c cmd arg ... -- run command, then interactive shell
- In addition:
    idle.py -t title -- specify alternate title for shell window    
- And perhaps:
    if $PYTHONSTARTUP is defined, use it (perhaps make it another option?)
- Need to define a standard way whereby one can determine one is running
  inside IDLE (needed for Tk mainloop, also handy for $PYTHONSTARTUP)
- Add utility methods for use by extensions (e.g. to get selection)

Details:

- when there's a selection, left/right arrow should go to either
  end of the selection
- ^O (on Unix -- open-line) should honor autoindent
- after paste, show end of pasted text
- on Windows, should turn short filename to long filename (not only in argv!)
  (shouldn't this be done -- or undone -- by ntpath.normpath?)

Structural problems:

- too much knowledge in FileList about EditorWindow (for example)
- Several occurrences of scrollable listbox with title and certain
  behavior; should create base class to generalize this

======================================================================

Jeff Bauer suggests:

- The editor should show the current line number.
- Open Module doesn't appear to handle hierarchical packages.
- Class browser should also allow hierarchical packages.
- Open and Open Module could benefit from a history,
  either command line style, or Microsoft recent-file
  style.
- Add a Smalltalk-style inspector  (i.e. Tkinspect)

The last suggestion is already a reality, but not yet
integrated into IDLE.  I use a module called inspector.py,
that used to be available from python.org(?)  It no longer
appears to be in the contributed section, and the source
has no author attribution.

In any case, the code is useful for visually navigating
an object's attributes, including its container hierarchy.

    >>> from inspector import Tkinspect
    >>> Tkinspect(None, myObject)

Tkinspect could probably be extended and refined to
integrate better into IDLE.

======================================================================

Comparison to PTUI
------------------

+ PTUI has a status line

+ PTUI's help is better (HTML!)

+ PTUI can attach a shell to any module

+ PTUI has more bells and whistles:
  open multiple
  append
  examine
  go

? PTUI's fontify is faster but synchronous (and still too slow);
  does a lousy job if editing affects lines below

- PTUI's shell is worse:
  no coloring;
  no editing of multi-line commands;
  ^P seems to permanently remove some text from the buffer

- PTUI's undo is worse:
  no redo;
  one char at a time

- PTUI's GUI is a tad ugly:
  I don't like the multiple buffers in one window model;
  I don't like the big buttons at the top of the widow

- PTUI lacks an integrated debugger

- PTUI lacks path and class browsers

- PTUI lacks many of IDLE's features:
  - expand word
  - regular expression search
  - search files (grep)
  - (un)tabify
  - center
  - zoom height

======================================================================

Notes after trying to run Grail
-------------------------------

- Grail does stuff to sys.path based on sys.argv[0]; you must set
sys.argv[0] to something decent first (it is normally set to the path of
the idle script).

- Grail must be exec'ed in __main__ because that's imported by some
other parts of Grail.

- Grail uses a module called History and so does idle :-(

======================================================================