Project Introduction
GitHub: GitHub - znsoooo/IDLE-Advance: Python3 IDLE增强计划
PyPI: idlea · PyPI
Test on Windows
For compatible with Windows XP
, project supports python 3.4
and above.
Install and test instance in cmd
:
pip install idlea -U
idlea
I have tested on the Windows platform.
Maybe it can be run in Linux after installed IDLE (idlelib library), but it has not been tested.
Notice
Will generate .pybak
format file(s) in current script file’s folder.
Will generate recent-saved.lst
file in the Python user directory.
Avoid exist same name files cause rewrite.
Functions Introduction
I introduce SOME functions, and show usage through animated pictures.
SmartSelect.py
Double-click mouse to highlight words, or select more meaningful selections.
- Highlight the selected word.
- Click the boundaries of string to select the whole string. (by using pre-tagged TAG in tk.Text)
- Quick select the whole comments by click the comment mark (# sign).
- Quick select the matched parentheses, including in comments.
- Select a row by double-click the end of line.
- Multi-line select by click the colon mark or click the space in indent.
- Select escape character (\n, \xhh, \uxxxx, …).
- …
SmartPairing.py
Quick add/delete/change pair or bracket or quotation marks.
- Auto complete 3 types of brackets and 2 types of quotation marks in pairs.
- Moving cursor without insert char when entering closing bracket (but not quotation mark).
- Auto delete the closing bracket when deleting the opening bracket or quotation mark. (if you need to enter the opening bracket independently, enter the opening bracket and press
Delete
to delete the closing bracket) - Select text with brackets or quotation marks, press
Backspace
to remove the outer one. - Select text with brackets or quotation marks, type another type of brackets or quotation marks to replace the old one.
ScrollHorizontal.py
Add horizontal scroll bar.
CopyNoSelect.py
When the selection is empty, select and copy/cut the current line.
Original Python’s IDLE can copy empty text, but it doesn’t seem make meaningful sense.
SelectVertical.py
Select text vertically.
- Pops up a input box after selecting text vertically.
- Enter text witch what you want to replace, enter empty text to delete selection.
- Cancel the input box to copy the selection to clipboard.
CalltipSelect.py
CallTips
was originally an object of type tk.Label
, I hack it into type tk.Text
, keeping the size and content unchanged, so the text in calltip can be SELECTED.
CursorHistory.py
Record cursor’s history positons
-
Left-click
and record cursor’s history positions. -
Alt-Left
to move cursor backward. -
Alt-Right
to move cursor forward.
AutoReload.py
Detect file modified in disk and prompt for reload.
Avoid forget editing files in different editors, but didn’t syncing them in IDLE.
- Prompt message box while the file on disk changed.
- Choose yes to reload file, lost local edit history.
- Choose not to not reload, set script unsaved state.
- Select
Reload
in menu to reload file manually.
Others
Other extensions were shown in my project, there are about 33 extensions as whole.
If anyone is interested, I will give a full introduction.
My wish
The Python IDEs I most usually used is IDLE
and PyCharm
. PyCharm
is powerful but slow to start-up, and it need install separately. IDLE
is more simply, but lack some useful features.
For this reason, I added some functions to IDLE
by hack into idlelib
library. I draw from my personal experience and some functions in PyCharm
.
Do you think ANY of these functions are worth adding to Python’s idlelib
library, or maybe become basic functions of IDLE
?
Do you have any suggestions? What can I do?