summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/pyshell.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-38792: Remove IDLE shell calltip before new prompt. (GH-17150)Miss Islington (bot)2020-01-311-0/+1
| | | | | | | | | Previously, a calltip might be left after SyntaxError, KeyboardInterrupt, or Shell Restart. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Tal Einat <taleinat+github@gmail.com> (cherry picked from commit bfdeaa37b3df7466624c17f9450d2bd1c3d95edf) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-36698: IDLE no longer fails when write non-encodable characters to ↵Miss Islington (bot)2019-10-081-5/+9
| | | | | | | | | stderr. (GH-16583) It now escapes them with a backslash, as the regular Python interpreter. Added the "errors" field to the standard streams. (cherry picked from commit b690a2759e62d9ee0b6ea1b20e8f7e4b2cdbf8bb) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-13153: Use OS native encoding for converting between Python and Tcl. ↵Miss Islington (bot)2019-10-041-18/+0
| | | | | | | | | | | | | | | (GH-16545) On Windows use UTF-16 (or UTF-32 for 32-bit Tcl_UniChar) with the "surrogatepass" error handler for converting to/from Tcl Unicode objects. On Linux use UTF-8 with the "surrogateescape" error handler for converting to/from Tcl String objects. Converting strings from Tcl to Python and back now never fails (except MemoryError). (cherry picked from commit 06cb94bc8419b9a24df6b0d724fcd8e40c6971d6) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-38183: Test_idle ignores user config directory GH-16198)Miss Islington (bot)2019-09-171-0/+1
| | | | | | | It no longer tries to create or access .idlerc or any files within. Users must run IDLE to discover problems with saving settings. (cherry picked from commit 0048afc16a7e7301d5c565237db271505e5fbed9) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-38041: Refine IDLE Shell restart lines. (GH-15709)Miss Islington (bot)2019-09-061-3/+15
| | | | | | Restart lines now always start with '=' and never end with ' ' and fill the width of the window unless that would require ending with ' ', which could be wrapped by itself and possible confusing the user. (cherry picked from commit 38da805d563422cf1bb9cd9be24c73806840fe30) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-37824: Properly handle user input warnings in IDLE shell. (GH-15500)Miss Islington (bot)2019-08-261-14/+3
| | | | | | Cease turning SyntaxWarnings into SyntaxErrors. (cherry picked from commit 1039f39c9c6edb4c185856c19316d3a4eb561c38) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.7] bpo-17535: IDLE editor line numbers (GH-14030)Tal Einat2019-07-231-0/+2
| | | (cherry picked from commit 7123ea009b0b004062d91f69859bddf422c34ab4)
* bpo-37321: Edit IDLE subprocess connection error messages. (GH-14170)Miss Islington (bot)2019-06-171-4/+4
| | | | | | Mainly, add a doc reference to message in pyshell. (cherry picked from commit 8fac1221097aaf6ac37ed9ea727ee7892085e183) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-35610: IDLE - Replace .context_use_ps1 with .prompt_last_line (GH-11307)Miss Islington (bot)2019-06-021-1/+1
| | | | | | Changes in bpo- 31858 made the less informative 'context_use_ps1' redundant. (cherry picked from commit 6bdc4dee01788599808c7858e2fe9fdd72cf6792) Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
* bpo-36429: Fix starting IDLE with pyshell (GH-12548)Miss Islington (bot)2019-03-271-5/+3
| | | | | | | Add idlelib.pyshell alias at top; remove pyshell alias at bottom. Remove obsolete __name__=='__main__' command. (cherry picked from commit 6a258c88906a7e8acde455ee2acb78b6f315ea0b) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. (GH-12031)Miss Islington (bot)2019-03-011-1/+1
| | | | | | Patch by Kevin Walzer. (cherry picked from commit 7eebbbd5b3907447eddadf5cb7cb1cc9230d15b2) Co-authored-by: Ned Deily <nad@python.org>
* bpo-35196: Optimize Squeezer's write() interception (GH-10454)Miss Islington (bot)2019-01-131-0/+3
| | | | | | | The new functionality of Squeezer.reload() is also tested, along with some general re-working of the tests in test_squeezer.py. (cherry picked from commit 39a33e99270848d34628cdbb1fdb727f9ede502a) Co-authored-by: Tal Einat <taleinat+github@gmail.com>
* bpo-34055: Revert deletion of line in IDLE's PyShell (GH-11346)Miss Islington (bot)2018-12-291-1/+1
| | | | | | The attribute is still used in other modules. (cherry picked from commit 4bc246786f003cdf1fffb3403b4cd92fc42ba9ef) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-34864: warn if "Prefer tabs when opening documents" set to "Always" ↵Miss Islington (bot)2018-12-071-4/+21
| | | | | | | | | | | | | | | | (GH-10464) * bpo-34864: warn if "Prefer tabs when opening documents" set to "Always" * add NEWS entry * address code review comments * address second code review comments * Add entry for idlelib/NEWS.txt. (cherry picked from commit 9ebe8794f003dadfff578a066ea503a3e37ffe1d) Co-authored-by: Tal Einat <taleinat+github@gmail.com>
* bpo-33656: Move pyshell ctypes import inside try block. (GH-9858)Miss Islington (bot)2018-10-141-3/+3
| | | | | | | A Windows build with _tkinter, tkinter, and idlelib but without ctypes is unlikely but apparently possible. (cherry picked from commit d274afb5e579a5d9d990f68f9af856cf4c918779) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-1529353: IDLE: squeeze large output in the shell (GH-7626)Miss Islington (bot)2018-09-251-0/+4
| | | | | (cherry picked from commit 604e7b9931f9e7881a2941816e538f5f15930db8) Co-authored-by: Tal Einat <taleinat+github@gmail.com>
* bpo-33924: Change IDLE mainmenu.menudefs key 'windows' to 'window' (GH-7836)Miss Islington (bot)2018-06-211-1/+1
| | | | | | | Every other menudef key is the lowercase version of the corresponding main menu entry (in this case, 'Window'). (cherry picked from commit 33c7420e7dd9d8e5b2aa15e98da6291bab6fcf33) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-33856: Add "help" to the welcome message of IDLE (GH-7755)Miss Islington (bot)2018-06-161-1/+1
| | | | | | Make it the same as when one runs 'python'. (cherry picked from commit 9d49f85064c388e2dddb9f8cb4ae1f486bc8d357) Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
* bpo-33656: Add enum name for argument of Windows call. (GH-7642)Miss Islington (bot)2018-06-111-1/+4
| | | | | | Change suggested by Eryk Sun in a comment on PR 7137 after it was merged. (cherry picked from commit fd88f319a4f40682b989b63f0b6378d69465fda4) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-33656: On Windows, add API call saying that tk scales for DPI (GH-7137)Miss Islington (bot)2018-06-111-0/+8
| | | | | | | | | | | | | | On Windows 8.1+ or 10, with DPI compatibility properties of the Python binary unchanged, and a monitor resolution greater than 96 DPI, this should make text and lines sharper. It should otherwise have no effect. Using a magnifier, I determined that the improvement comes from horizontal and lines being better lined up with the monitor pixels. I checked that this call causes no problem on any Windows buildbot, including the Win7 buildbots. Unlike most IDLE patches, this one can be easily reverted by users by removing a few lines, at the top of idlelib/pyshell.py. (cherry picked from commit 800415e3df69f494afe9f95a8563ce17609fe1da) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-32984: IDLE - set __file__ for startup files (GH-5981)Miss Islington (bot)2018-03-051-0/+3
| | | | | | | | | | | | Like Python, IDLE optionally runs one startup file in the Shell window before presenting the first interactive input prompt. For IDLE, option -s runs a file named in environmental variable IDLESTARTUP or PYTHONSTARTUP; -r file runs file. Python sets __file__ to the startup file name before running the file and unsets it before the first prompt. IDLE now does the same when run normally, without the -n option. (cherry picked from commit 22c82be5df70c3d51e3f89b54fe1d4fb84728c1e) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* IDLE -- Restrict shell prompt manipulaton to the shell. (#4143)Terry Jan Reedy2017-10-281-13/+11
| | | | | | Editor and output windows only see an empty last prompt line. This simplifies the code and fixes a minor bug when newline is inserted. Sys.ps1, if present, is read on Shell start-up, but is not set or changed.
* bpo-31500: IDLE: Scale default fonts on HiDPI displays. (#3639)Serhiy Storchaka2017-09-211-0/+4
|
* bpo-8231: Call idlelib.IdleConf.GetUserCfgDir only once. (#2629)terryjreedy2017-07-081-2/+2
|
* bpo-30495: IDLE: improve textview with docstrings, PEP8 names, more tests. ↵csabella2017-06-291-1/+1
| | | | | | | (#2283) Split TextViewer class into ViewWindow, ViewFrame, and TextFrame classes so that instances of the latter two can be placed with other widgets within a multiframe window. Patch by Cheryl Sabella.
* bpo-30166: Import command-line parsing modules only when needed. (#1293)Serhiy Storchaka2017-05-041-4/+6
|
* bpo-29919: Remove unused imports found by pyflakes (#137)Victor Stinner2017-03-271-1/+0
| | | Make also minor PEP8 coding style fixes on modified imports.
* import sys before we use it on line 9 (#828)Jelle Zijlstra2017-03-271-1/+2
|
* Issue #29162: Don't depend on 'from tkinter import *' importing sys.Terry Jan Reedy2017-01-051-3/+3
| | | | Fix error in format string.
* Issue #27891: Consistently group and sort imports within idlelib modules.Terry Jan Reedy2016-08-311-12/+12
|
* Issue #27611, #24137: Only change tkinter when easily restored.Terry Jan Reedy2016-08-161-2/+4
|
* Issue #25507: Move 4 objects from pyshell to run and switch inports.Terry Jan Reedy2016-07-151-100/+1
| | | | This removes one problem inport and reduces len(sys.modules) by 37.
* Issue #24137: Fixed IDLE on Linux with tkinter default root disabled.Serhiy Storchaka2016-06-251-1/+2
|
* Issue #24137: Run IDLE, test_idle, and htest with tkinter default root disabled.Terry Jan Reedy2016-06-211-1/+4
| | | | | Fix code and tests that fail with this restriction. Fix htests to not create a second and redundant root and mainloop.
* Issue #5124: rename PyShell back to pyshell and patch test for 3.6Terry Jan Reedy2016-06-111-0/+1631
|
* Issue #5124: Temporary pyshell rename to avoid case-folding collision in merge.Terry Jan Reedy2016-06-111-1618/+0
|
* Issue #24759: IDLE requires tk 8.5 and availability ttk widgets.Terry Jan Reedy2016-06-101-9/+16
| | | | Delete now unneeded tk version tests and code for older versions.
* Issue #27262: move Aqua unbinding code, which enable context menus, to maxosx.Terry Jan Reedy2016-06-081-8/+0
|
* Issue #24225: Within idlelib files, update idlelib module names.Terry Jan Reedy2016-05-281-34/+34
| | | | | | | | | | | | | | | | This follows the previous patch that changed idlelib file names. Class names that matched old module names are not changed. Change idlelib imports in turtledemo.__main__. Exception: config-extensions.def. Previously, extension section names, file names, and class names had to match. Changing section names would create cross-version conflicts in config-extensions.cfg (user customizations). Instead map old names to new file names at point of import in editor.EditorWindow.load_extension. Patch extensively tested with test_idle, idle_test.htest.py, a custom import-all test, running IDLE in a console to catch messages, and testing each menu item. Based on a patch by Al Sweigart.
* Issue #24225: Rename many idlelib/*.py and idlelib/idle_test/test_*.py files.Terry Jan Reedy2016-05-221-0/+1619