python / cpython

The Python programming language
https://www.python.org
Other
62.32k stars 29.94k forks source link

IDLE: Detect file if modified at local disk and prompt to ask refresh #94523

Open znsoooo opened 2 years ago

znsoooo commented 2 years ago

Feature or enhancement

Because IDLE not good at text editing, I sometimes use another text editor to make text editing such as text replacement and refactoring while opening IDLE parallelly.

But when I go back to IDLE, the editor doesn't give any hints, and then on the next run, my text changes are overwritten.

So I add a feature that IDLE can detect whether the local file has changed and make a prompt, ask to refresh. or set file into unsaved state if not refreshed.

Previous discussion

Discuss at: https://discuss.python.org/t/i-made-some-improvement-for-idle-can-i-contribute-to-idlelib-library-in-python-project

Usage: https://github.com/znsoooo/IDLE-Advance

Implementation: https://github.com/znsoooo/IDLE-Advance/blob/master/idlealib/AutoReload.py

CoolCat467 commented 4 weeks ago

To be honest this is halfway advertising, but I made an extension that allows you to reload a currently open file in IDLE, but does not currently support automatic reloading as of writing: https://pypi.org/project/idlereload/