Also add .pyi to the python extensions in the "File-open" and "File-save" dialogues.
Add util.py to contain objects that are used in multiple idlelib modules
and have no dependencies on any of them.
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 50cf4991c4)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
On Windows, one had to Tab or click on the entry box
to get a cursor and be able to enter anything.
(cherry picked from commit d1df81a730)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
mistakenly included in 3 files in previous PR
and backported both to 3.10 and 3.9.
(cherry picked from commit 916d0d822c)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 53c7808057)
Co-authored-by: Wes <5124946+wesinator@users.noreply.github.com>
In the File menu, 'Close' and 'Exit' are now 'Close Window' (the current
one) and 'Exit' is now 'Exit IDLE' (by closing all windows).
In Shell, 'quit()' and 'exit()' mean 'close Shell'.
If there are no other windows, this also exits IDLE.
(cherry picked from commit fcde0bc10d)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Since the keyword list is frozen, only compute it once per
session. The colorizer already handles context keywords.
(cherry picked from commit 42ac06dcd2)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Automerge-Triggered-By: GH:terryjreedy
Fix typos in the Lib directory as identified by codespell.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>.
(cherry picked from commit 745c9d9dfc)
Co-authored-by: Christian Clauss <cclauss@me.com>
IDLE recognizes Ctrl-D, as on other systems, instead of Ctrl-Z.
(cherry picked from commit e649e0658f)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
The line that should not have been needed on macOS tk 8.6.8 but was,
should not be a problem on Ubuntu, but is. It is not needed on macOS
tk 8.6.11, installed with 3.10. Disable it but leave it for
now in case some system needs it.
(cherry picked from commit 1afc7b3219)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Expression 'python_version()[:3]' truncated '3.10.0' to '3.1' instead of '3.10'.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit b74c819fab)
Co-authored-by: giovanniwijaya <16949408+giovanniwijaya@users.noreply.github.com>
In particular, when running with tk8.6.8, as in PSF 3.9.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 3ec3ee7d2e)
Co-authored-by: Kaustubh J <kaustubhkj@gmail.com>
If ttk.Spinbox is not available (Tk < 8.5.9) use readonly ttk.Combobox.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 42d5a4fc3b)
Co-authored-by: Mark Roseman <mark@markroseman.com>
Replace it with Windows tab for Shell and Editor options
and Shell/Ed for options exclusive to one of them.
Create room for more options and make dialog shorter,
to better fit small windows.
(cherry picked from commit 275d5f7957)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
These are the settings that extend the help menu. Moving them shortens the dialog and will help with it being too tall for small screens.
(cherry picked from commit ab36b9f834)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Signed-off-by: Tal Einat <532281+taleinat@users.noreply.github.com>
(cherry picked from commit adef445dc3)
Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
Since the <Configure> event may occur after the
completion window is gone, catch potential
TclError exceptions when accessing acw.
(cherry picked from commit 4e2e5c1c4f)
A C function accessible by the default exception handler, but not by python code,
finds the existing name closest to the name causing a name or attribute error. For
such errors, call the default handler after capturing stderr and retrieve its message line.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 092f9ddb5e)
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
Left click and drag to select lines. With selection, right click for context menu with copy and copy-with-prompts.
Also add copy-with-prompts to the text-box context menu.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Remove call to macosx.setupApp, which calls macosc.overrideRootMenu, which modifies
the menus, which results in two failures in the second round of the leak test.
Printing to IDLE's Shell is often slower than printing to a system
terminal, but it can be made faster by pre-formatting a single
string before printing.
For back-compatibility, make the new constructor parameter for public classes Function and Class
keyword-only with a default of None.
Co-authored-by: Aviral Srivastava <aviralsrivastava@Avirals-MacBook-Air.local
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Starting stack viewer when user code is running, including when Debugger is active, hangs or crashes IDLE.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Lowercase 'tkColorChooser', 'tkFileDialog', 'tkSimpleDialog', and
'tkMessageBox' and remove 'tk'. Just lowercase 'tkFont' as 'font'
is already used. Adjust import.