[issue13179] IDLE uses common tkinter variables across all editor windows
New submission from Roger Serwy : IDLE's EditorWindow.py relies on using FileList.py's "vars" dictionary to store Tkinter variables instead of using its own. As a consequence, toggling a checked menu item in one editor window toggles the menu item in ALL editor windows. To reproduce this error, open two editor windows with Code Context initially disabled. Enable Code Context in one window and then click "Options" in the other. You'll see Code Context checked when it shouldn't be. Attached is a patch to fix this problem. It causes EditorWindow to have its own dictionary for handling these Tkinter variables instead of using the flist's "vars". The comment in FileList.py suggests that this design is a relic from an old version of IDLE, since getrawvar is no longer a function. self.vars = {} # For EditorWindow.getrawvar (shared Tcl variables) -- components: IDLE files: patch_EditorWindow.diff keywords: patch messages: 145539 nosy: serwy priority: normal severity: normal status: open title: IDLE uses common tkinter variables across all editor windows type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file23406/patch_EditorWindow.diff ___ Python tracker <http://bugs.python.org/issue13179> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13039] IDLE editor: shell-like behaviour on line starting with ">>>"
Roger Serwy added the comment: Here's a patch. The smart_backspace_event code considers sys.ps1 even though it's not a PyShell instance. The "context_use_ps1" flag is already used to modify other behavior of the editor window when it is a PyShell instance, so it is appropriate to use it here as well. -- keywords: +patch nosy: +serwy Added file: http://bugs.python.org/file23407/patch13039.diff ___ Python tracker <http://bugs.python.org/issue13039> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13052] IDLE: replace ending with '\' causes crash
Roger Serwy added the comment: I see that Ezio added me to the nosy list. Here's a patch that identifies bogus escape characters at the end of the replvar string and appends an extra \ to fix it. -- keywords: +patch Added file: http://bugs.python.org/file23409/patch13052.diff ___ Python tracker <http://bugs.python.org/issue13052> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9150] IDLE should not save trailing whitespace after strip trailing whitespace has been used
Changes by Roger Serwy : -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue9150> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13052] IDLE: replace ending with '\' causes crash
Roger Serwy added the comment: I don't have the beep problem you describe under Linux using Python 3.2 (r32:88445, Mar 25 2011, 19:56:22). That may be a platform-specific bug. Here's a patch to use re.escape instead. A minor side effect of using re.escape is that it is not possible to use \n itself in the replace string. It gets escaped as \\n. -- Added file: http://bugs.python.org/file23411/patch13052_re.diff ___ Python tracker <http://bugs.python.org/issue13052> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13179] IDLE uses common tkinter variables across all editor windows
Roger Serwy added the comment: For Code Context, the behavior is a bug since the menu item check can be changed independently of the actual status of Code Context. As far as I can tell, flist.vars mostly contains variables created by EditorWindow.py's "get_var_obj". A quick grep for ".vars" in idlelib can confirm that. It also contains variables created by PyShell.py, particularly '<>' and '<>'. Since the shell can only have one instance, its tkinter variables can be held local to the EditorWindow instance. -- ___ Python tracker <http://bugs.python.org/issue13179> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1053687] PyOS_InputHook not called in IDLE subprocess
Roger Serwy added the comment: This is related to http://bugs.python.org/issue989712 -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue1053687> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13296] IDLE: __future__ flags don't clear on shell restart
New submission from Roger Serwy : The interactive interpreter in IDLE does not reset its compiler __future__ flags when you restart the shell. To verify this, type into the shell: >>> from __future__ import barry_as_FLUFL >>> 1 != 2 You'll get a syntax error. Restart the shell and type >>> 1 != 2 A syntax error still occurs. The ModifiedInterpreter class in PyShell.py ultimately relies on codeop to mimic the interactive prompt. The codeop module was created specifically for remembering __future__ flags for subsequent commands. The provided patch stores the flags of the interpreter when it first initializes, and then restores them in "restart_subprocess". It's a patch against 3.2.2. -- components: IDLE files: patch_future.diff keywords: patch messages: 146646 nosy: ezio.melotti, serwy priority: normal severity: normal status: open title: IDLE: __future__ flags don't clear on shell restart type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file23557/patch_future.diff ___ Python tracker <http://bugs.python.org/issue13296> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5219] IDLE/Tkinter: edit win stops updating when tooltip is active
Roger Serwy added the comment: Attached is a patch against 3.2.2 which does proper after_cancel calls on the after calls to checkhide_event. -- Added file: http://bugs.python.org/file23558/patch5219.diff ___ Python tracker <http://bugs.python.org/issue5219> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13265] IDLE crashes when printing some unprintable characters.
Roger Serwy added the comment: I can reproduce the problem with Ubuntu 11.04 with Python 3.2. The WidgetRedirector calls tk_call with a tuple containing unencoded Unicode strings. Attached is a patch to encode all arguments if the argument has the "encode" attribute. This seems to fix the problem, but can someone who knows more about Python and Tk's Unicode handling take a look? -- keywords: +patch nosy: +serwy Added file: http://bugs.python.org/file23561/patch13265.diff ___ Python tracker <http://bugs.python.org/issue13265> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13319] IDLE: Menu accelerator conflict between Format and Options
New submission from Roger Serwy : This is a minor interface issue. The accelerator for opening the _Options menu in an editor conflicts with the F_ormat menu. I suggest changing the Options accelerator to "i" since Alt-t is for toggling tabs. (Perhaps the accelerator for <> should be dropped, so that the options menu could be accessed by Alt-t.) -- components: IDLE messages: 146819 nosy: serwy priority: normal severity: normal status: open title: IDLE: Menu accelerator conflict between Format and Options type: feature request versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issue13319> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13319] IDLE: Menu accelerator conflict between Format and Options
Roger Serwy added the comment: Which platform are you running? On Linux (Ubuntu 11.10, Python 3.2, Tk 8.5), Alt-o does not toggle between Format and Options. The first Alt-o selects "Format" and the second Alt-o selects "Comment Out Region". Changing Format's accelerator to "a" would be inconsistent with other applications that use "o", such as LibreOffice and Abiword. Consistency aside, changing Format to "a" would be the simplest fix. -- ___ Python tracker <http://bugs.python.org/issue13319> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13319] IDLE: Menu accelerator conflict between Format and Options
Roger Serwy added the comment: Alt-3 is comment-out region on Linux as well. The problem is that "o" is an accelerator for "Comment Out Region" under the Format menu. Pressing "Alt-o and o" under Linux is equivalent to "Alt-o and Alt-o". This toggling between Format and Options may be a Tk bug under Linux since it works on Win7. -- ___ Python tracker <http://bugs.python.org/issue13319> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12988] IDLE on Win7 crashes when saving to Documents Library
Changes by Roger Serwy : -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue12988> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8793] IDLE crashes on opening invalid file
Roger Serwy added the comment: With IDLE 3.2 on Ubuntu 11.04, this is not a problem. An error box pops up: SyntaxError (unicode error) 'unicodeescape' codec can't decode bytes in position 0-3: truncated \xXX escape With IDLE 2.7.1 on Ubuntu 11.04, the console gives the error described by Amaury. A quick fix would be to add "ValueError" to the except clause in "checksyntax" in ScriptBinding for the 2.7 branch. -- nosy: +serwy versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue8793> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13495] IDLE: Regression - Two ColorDelegator instances loaded
New submission from Roger Serwy : Two instances of ColorDelegator are in the percolator chain. This is a regression from 2.x. The problem can be found in __init__ of EditorWindow in EditorWindow.py. Calling "io.loadfile" eventually calls "filename_change_hook" (See IOBinding.py's "set_filename"). The "filename_change_hook" calls "ResetColorizer" which brings up an instance of ColorDelegator. Then, the self.color reference is overwritten by a new ColorDelegator instance and added to the percolator chain. The attached patch fixes the problem. -- components: IDLE files: colorbug.patch keywords: patch messages: 148513 nosy: ned.deily, serwy priority: normal severity: normal status: open title: IDLE: Regression - Two ColorDelegator instances loaded type: behavior versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file23798/colorbug.patch ___ Python tracker <http://bugs.python.org/issue13495> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))
Roger Serwy added the comment: I can confirm that using "idle -e " still causes a hang on Windows using 3.2.2 and on Ubuntu using 2.7.1 and 3.2 The given patch fixes the problem on those platforms. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue3573> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13504] Meta-issue for "Invent with Python" IDLE feedback
Changes by Roger Serwy : -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue13504> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13506] IDLE sys.path does not contain Current Working Directory
Roger Serwy added the comment: +1 The proposed patch works as described. I do agree with Marco that IDLE does need some more QA. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue13506> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13504] Meta-issue for "Invent with Python" IDLE feedback
Roger Serwy added the comment: #2704 covers point 1 (In the shell window, if you click anywhere but on the current line and move the cursor there, the window stops handling key strokes.) #3851 covers point 1.1) "Pressing the Home key moves the cursor before the >>> prompt, which then makes the keyboard unresponsive." #7136 covers point 5) "Opening a file editor window or a shell window isn’t clear." #6804 and #6858 are also related to point 7 "It’s too easy to forget the .py extension when saving a file." #694339 covers point 13) "The Indent Region and Dedent Region lines use the keyboard shortcut Ctrl-] and Ctrl-[, even though nobody uses that because you can indent the region by pressing tab." #5150 is related to point 14) "Get rid of the Format > “Strip trailing whitespace” option from the menu" #10747 covers point 16) "The Windows shortcuts for IDLE don’t have the version in their name." -- ___ Python tracker <http://bugs.python.org/issue13504> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11838] IDLE: make interactive code savable as a runnable script
Changes by Roger Serwy : -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue11838> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11838] IDLE: make interactive code savable as a runnable script
Roger Serwy added the comment: I considered saving directly from the shell but then I ran into a use-case problem. Saving the shell window as an runnable script will also save any syntax errors that were entered. A user would then have to open an editor to correct these errors. A high-level task analysis would be as follows: With "Save As Runnable", the user needs to save, open, and then fix. With "Paste from Shell", the user needs to copy, paste, and then fix. If you have suggestions for handling shell errors, I'm open to them. -- ___ Python tracker <http://bugs.python.org/issue11838> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13506] IDLE sys.path does not contain Current Working Directory
Roger Serwy added the comment: I have given this issue some further consideration, and realized that my "+1" recommendation was not correct. Starting the interactive python interpreter will automatically include [''] in sys.path. A fresh restart of IDLE's shell does NOT include ''. However, running a python script will have sys.path include the absolute path to the script. IDLE's shell does do this in conjunction with ScriptBinding's "Run Module". The new patch preserves the existing correct behavior, but also fixes the issue. -- keywords: +patch Added file: http://bugs.python.org/file23846/issue13506.patch ___ Python tracker <http://bugs.python.org/issue13506> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13495] IDLE: Regression - Two ColorDelegator instances loaded
Roger Serwy added the comment: I attached a better patch that preserves the goals of the original code while not creating two color delegators. I traced down when the regression occurred (2007-09-06): (a4bd8a4805a8) 1. Fail gracefully if the file fails to decode when loaded. This patch (2008-02-16) modified parts of the last patch, as well adds "ResetColorizer" to the filename_change_hook. (7c4c46342137) Merged revisions 60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,605 -- nosy: +christian.heimes, kbk -ned.deily Added file: http://bugs.python.org/file23854/issue13495.patch ___ Python tracker <http://bugs.python.org/issue13495> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8641] IDLE 3 doesn't highlights b"", but u""
Roger Serwy added the comment: I applied the patch against the latest version in the repository and it works correctly. -- nosy: +serwy type: -> behavior versions: +Python 3.2, Python 3.3 ___ Python tracker <http://bugs.python.org/issue8641> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11838] IDLE: make interactive code savable as a runnable script
Roger Serwy added the comment: This issue relates to #1178 A traceback does not necessarily mean that the last statement had the error. For example: >>> a = lambda: 1/0 >>> a() Traceback (most recent call last): File "", line 1, in a() File "", line 1, in a = lambda: 1/0 ZeroDivisionError: integer division or modulo by zero I suppose that the specification should be extended such that the above to get transformed to: a = lambda: 1/0 #ERROR>>> a() # #Traceback (most recent call last): # or something similar. Thoughts? -- ___ Python tracker <http://bugs.python.org/issue11838> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7136] Idle File Menu Option Improvement
Roger Serwy added the comment: This issue is mentioned as part of #13504 meta-issue. The attached patch extends Tal's original patch by also updating the help.txt documentation. -- nosy: +serwy Added file: http://bugs.python.org/file23878/issue7136.patch ___ Python tracker <http://bugs.python.org/issue7136> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13319] IDLE: Menu accelerator conflict between Format and Options
Roger Serwy added the comment: Attached is a patch to have Alt-i bring up the Options menu. -- keywords: +patch Added file: http://bugs.python.org/file23879/issue13319.patch ___ Python tracker <http://bugs.python.org/issue13319> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8515] idle "Run Module" (F5) does not set __file__ variable
Roger Serwy added the comment: I've encountered this bug several times myself. I applied this patch and it corrects the issue. -- nosy: +serwy versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker <http://bugs.python.org/issue8515> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4691] IDLE Code Caching Windows
Roger Serwy added the comment: Given Amaury's last message, should this issue be closed as being resolved? -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue4691> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7676] IDLE shell shouldn't use TABs
Roger Serwy added the comment: Here's a simple patch to fix this bug. The ">>> " prompt causes the first level of indented code to use 8 spaces. Further indented code should use 4 spaces, but still uses 8 spaces likely due to the bug described in #8285. -- keywords: +patch nosy: +serwy versions: +Python 3.3 Added file: http://bugs.python.org/file23887/issue7676.patch ___ Python tracker <http://bugs.python.org/issue7676> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6321] Reload Python modules when running programs
Roger Serwy added the comment: Should this issue be closed? It is related to #4691. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue6321> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6699] IDLE: Warn user about overwriting a file that has a newer version on filesystem
Roger Serwy added the comment: The patch won't apply against 3.3a0 because "self.set_saved(1)" became "self.set_saved(True)" in r70054 (da7a120c0478) After correcting this minor point, the patch works as expected. -- nosy: +serwy versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue6699> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10364] IDLE: make .py default added extension on save
Roger Serwy added the comment: This is a duplicate of #4832. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue10364> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6698] IDLE no longer opens only an edit window when configured to do so
Roger Serwy added the comment: Attached is a patch to correct the existing bug as-is. Should the behavior of IDLE be changed as Tal suggests? -- keywords: +patch nosy: +serwy Added file: http://bugs.python.org/file23911/issue6698.patch ___ Python tracker <http://bugs.python.org/issue6698> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8900] IDLE crashes if Preference set to At Startup -> Open Edit Window
Roger Serwy added the comment: Attached is a patch to fix the bug. When selecting "Open" from the File Menu, "ishanderrunning" is empty. Unbind/Bind requests are handled synchronously. When pressing "Ctrl+O", "ishandlerrunning" is no longer empty, and the actual bind/unbind events get appended to "doafterhandle". The original code was running these bind/unbind events in REVERSE order by using "pop", so unbind requests were being made (and causing the error) before the proper bind request. -- keywords: +patch nosy: +serwy versions: +Python 3.2, Python 3.3 -Python 3.1 Added file: http://bugs.python.org/file23915/issue8900.patch ___ Python tracker <http://bugs.python.org/issue8900> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13582] IDLE and pythonw.exe stderr problem
New submission from Roger Serwy : Running IDLE on Windows typically uses pythonw.exe. Unfortunately any error messages written to stderr will cause IDLE to terminate abruptly without an error message. This is due to __stderr__ == None. Attached is a patch against 3.3a0 for idle.pyw to redirect stderr messages to a dialog box. This allows IDLE to keep running so that the user can at least save their work before closing IDLE. -- components: IDLE files: idle_pyw.patch keywords: patch messages: 149244 nosy: serwy priority: normal severity: normal status: open title: IDLE and pythonw.exe stderr problem type: behavior versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file23916/idle_pyw.patch ___ Python tracker <http://bugs.python.org/issue13582> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13571] Backup files support in IDLE
Roger Serwy added the comment: I rarely have IDLE crash on Linux. If you're experiencing these issues on Windows, see #13582. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue13571> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13582] IDLE and pythonw.exe stderr problem
Roger Serwy added the comment: You can try triggering bug #8900 quite simply. From a shell or an editor, press Ctrl+N and then Ctrl+O. Open a file and watch IDLE terminate abruptly. Also, see #12274. If you want to play with this problem further, try adding a "raise Exception" to a constructor for one of the extensions. Running IDLE using python.exe will display a traceback in the console, but IDLE keeps running. However, IDLE won't even bring up a window when using pythonw.exe; it just fails to launch from the user's perspective. -- ___ Python tracker <http://bugs.python.org/issue13582> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7163] IDLE suppresses sys.stdout.write() return value
Roger Serwy added the comment: If you add "return len(s)" to PseudoFile::write in PyShell.py, then it will work. However, this approach may not be "the right thing to do." -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue7163> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13532] In IDLE, sys.stdout.write and sys.stderr can write any pickleable object
Roger Serwy added the comment: The crash can be prevented by using #13582. The RPCProxy object would need to be subclassed so that it raises TypeError for the "write" method when it is not given a string. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue13532> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13582] IDLE and pythonw.exe stderr problem
Roger Serwy added the comment: Here is a list of open issues that describe IDLE suddenly crashing, which can be traced back to pythonw.exe: #4765, #5707, #6257, #6739, #9404, #9925, #10365, #11437, #12274, #12988, #13052, #13071, #13078, #13153 This patch does not fix these errors, but at least these errors will no longer be fatal. This patch also "future-proofs" against yet to be discovered (or yet to be introduced) bugs into IDLE. -- ___ Python tracker <http://bugs.python.org/issue13582> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4625] IDLE won't open anymore, .idlerc unaccessible
Roger Serwy added the comment: A quick test on Linux would be: chmod -w ~/.idlerc/recent-files.lst IDLE will give a traceback and not start. This should not be a fatal error. The provided patch will present an error dialog if the recent files list can not be written. -- keywords: +patch nosy: +serwy Added file: http://bugs.python.org/file23948/issue4625.patch ___ Python tracker <http://bugs.python.org/issue4625> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9404] IDLE won't launch on XP
Roger Serwy added the comment: This is a duplicate of #4625. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue9404> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4625] IDLE won't open anymore, .idlerc unaccessible
Roger Serwy added the comment: I just tested Ned's updated patches against 3.3a0 and 2.7 and they work as advertised. -- ___ Python tracker <http://bugs.python.org/issue4625> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13571] Backup files support in IDLE
Roger Serwy added the comment: Would you want to collaborate on writing an extension to do this? Check out IdleX. -- ___ Python tracker <http://bugs.python.org/issue13571> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4832] idle filename extension
Roger Serwy added the comment: I was unable to produce the crash that Pavel described in msg87703. Just adding "defaultextension=''" solves this issue for Windows and still preserves the correct behavior on Linux. Amaury's quote of tcl/tk documentation in msg87695 mentions this as well. I tested this on Linux with 2.7.1 and 3.2 and on Windows Vista using 2.7.1 and 3.2.2. Attached is a diff against 3.3a0. -- nosy: +serwy Added file: http://bugs.python.org/file23956/issue4832.diff ___ Python tracker <http://bugs.python.org/issue4832> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened
Roger Serwy added the comment: William's explanation in msg123203 for the cause of the error and the solution for keeping a reference to "flist" is good. IDLE has only one instance of FileList while running anyways. Attached is a patch that behaves like William's description. The modification to PyShell.py is necessary for a corner-case. If the last IDLE window is closed with the Open File dialog still open, then FileList.py and WindowList.py both call .quit(). Without the modification, IDLE closes after selecting a file since root.mainloop() returns and root.destroy() gets executed. The alternative (and simpler) method is to have the Open File dialog be modal, but AFAIK it can't be set to modal. -- nosy: +serwy Added file: http://bugs.python.org/file23957/issue10365_rev2.patch ___ Python tracker <http://bugs.python.org/issue10365> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13582] IDLE and pythonw.exe stderr problem
Roger Serwy added the comment: I don't have a Mac to test against. Is there anything I need to do to improve the patch? -- ___ Python tracker <http://bugs.python.org/issue13582> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13571] Backup files support in IDLE
Roger Serwy added the comment: Let's move this discussion to the IDLE-dev mailing list. -- ___ Python tracker <http://bugs.python.org/issue13571> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13586] IDLE: Replace selected not working/consistent with find
Roger Serwy added the comment: On Linux using 2.7.1 and 3.2, the Replace dialog does not contain the selected text in the Find field. The find functionality that copies the selected text was introduced in 868ff0dfabd2 on 2002-11-06. Unfortunately it wasn't added to the Replace Dialog code. The attached patch (against 3.3a0) adds this functionality to Replace Dialog and also removes some non-functional (arguably broken) code. -- keywords: +patch nosy: +serwy Added file: http://bugs.python.org/file24003/issue13586.patch ___ Python tracker <http://bugs.python.org/issue13586> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8231] Unable to run IDLE without write-access to config directory
Changes by Roger Serwy : -- components: +IDLE -Library (Lib), Windows nosy: +serwy versions: +Python 2.7, Python 3.2, Python 3.3 -Python 3.1 ___ Python tracker <http://bugs.python.org/issue8231> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13586] IDLE: Replace selected not working/consistent with find
Changes by Roger Serwy : Added file: http://bugs.python.org/file24016/find_keep_open.patch ___ Python tracker <http://bugs.python.org/issue13586> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5492] Error on leaving IDLE with quit() or exit() under Linux
Roger Serwy added the comment: You can trigger this error every time if you change ".after(2*self.poll_interval, self.close2)" to ".after(1, self.close2)" in PyShell.py -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue5492> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13630] IDLE: Find(ed) text is not highlighted while dialog box is open
Roger Serwy added the comment: IDLE does have a color scheme configuration for "found" as listed in the highlighting config dialog and internally as the Tkinter Text tag "hit". This looks like the stubs for functionality that never got implemented. Take a look at the SearchBar IDLE extension. It provides incremental searching which highlights all matches. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue13630> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10079] idlelib for Python 3 with Guilherme Polo GSoC enhancements
Roger Serwy added the comment: I went through the changes in "idlelib20101012_From_r32a3.patch". A lot of the changes are for using relative imports. Those changes aside, here is a list of issues that this patch covers. Most of these issues already have patches that are included in the large patch. EditorWindow.py, textView.py: issue964437 - "idle help is modal" EditorWindow.py, OutputWindow.py, PyShell.py: issue1207589 - "Right Click Context Menu" ClassBrowser.py: patch in issue1612262 - "Class Browser doesn't show internal classes" FileRevert.py: patch in issue1721083 - "Add File - Reload" IOBinding.py: patch in issue6699 - "IDLE: Warn user about overwriting a file that has a newer version on filesystem" patch in issue4832 - "idle filename extension" PyShell.py: - use "subprocess" module - already fixed in issue12540 - patch for "paste_callback" in issue3359 - "Pasted \n not same as typed \n" - fix for issue6698 "IDLE no longer opens only an edit window when configured to do so" There are two major changes that are not covered by other issues (AFAIK). 1) The "PseudoStderrFile" in PyShell.py brings the shell forward if an error occurs. I like this behavior. 2) Run a script without saving it first. This functionality is scattered across several files. There are several other small tweaks in the patch that will need some review. If I missed anything, please add a comment. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue10079> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10079] idlelib for Python 3 with Guilherme Polo GSoC enhancements
Roger Serwy added the comment: minor mistake - issue3559 "Pasted \n not same as typed \n" -- ___ Python tracker <http://bugs.python.org/issue10079> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10079] idlelib for Python 3 with Guilherme Polo GSoC enhancements
Roger Serwy added the comment: I checked the submitted patches from the issues against the large patch by eye. Guilherme's patches in these separate issues have the same contents: issue1207589, issue1612262, issue1721083, issue6699, issue3359. The large patch updates issue964437, but the "view_file" change is outdated. I wrote more recent patches for issue4832 and issue6698. -- ___ Python tracker <http://bugs.python.org/issue10079> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12510] IDLE get_the_calltip mishandles raw strings
Roger Serwy added the comment: The attached patch fixes the bug. The bug occurs in "get_entity" which is used to get the object. Then "get_argspec" determines the calltip text. The calltip can be prevented for strings by having get_argspec check if the object has a "__call__" method. I opted for adding "not callable" to the calltip initially for testing, but setting argspec="" will prevent the calltip altogether. -- keywords: +patch nosy: +serwy Added file: http://bugs.python.org/file24071/issue12510.patch ___ Python tracker <http://bugs.python.org/issue12510> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9016] IDLE won't launch (Win XP)
Roger Serwy added the comment: Is this still a problem? -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue9016> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6528] builtins colored as keyword at beginning of line
Roger Serwy added the comment: The attached patch excludes keywords from the builtin list and corrects the highlighting configuration panel. -- keywords: +patch nosy: +serwy versions: +Python 3.2, Python 3.3 -Python 3.1 Added file: http://bugs.python.org/file24072/issue6528.patch ___ Python tracker <http://bugs.python.org/issue6528> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8093] IDLE processes don't close
Roger Serwy added the comment: This issue should be closed since issue12540 fixes it. I verified that the bug exists with 3.1.4 on Vista. It does not exist with 3.2.2 on Vista. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue8093> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8820] IDLE not launching correctly
Roger Serwy added the comment: Is this still a problem with 2.7? -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue8820> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7883] CallTips.py _find_constructor does not work
Roger Serwy added the comment: The patch works for me as well against 3.3a0. Are there any cases where "__init__.__func__" would work? -- nosy: +serwy versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue7883> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13078] Python Crashes When Saving Or Opening
Roger Serwy added the comment: Is this still an issue? Ash, can you please run IDLE from the command line and report the error message from there? cd c:\python32 python -m idlelib.idle -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue13078> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10079] idlelib for Python 3 with Guilherme Polo GSoC enhancements
Roger Serwy added the comment: The large patch also contains the same patch in issue6649. -- ___ Python tracker <http://bugs.python.org/issue10079> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9150] IDLE should not save trailing whitespace after strip trailing whitespace has been used
Roger Serwy added the comment: Is this still an issue? -- ___ Python tracker <http://bugs.python.org/issue9150> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9201] IDLE: raises Exception TclError in a special case
Roger Serwy added the comment: This issue was fixed in 500e48708470, as part of issue3851. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue9201> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13553] Tkinter doesn't set proper application name
Roger Serwy added the comment: Does IDLE appear as "Tk" in Gnome3? -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue13553> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue694339] IDLE: Dedenting with Shift+Tab
Roger Serwy added the comment: I applied the patch and encountered a problem. MultiCall.py is replacing "" with "". When this happens, the logic for rebinding "<>" fails. event_info('<>') returns ('', '', '') event_info('<>') returns ('', '') This is with 3.3a0 on Ubuntu 11.04. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue694339> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12930] reindent.py inserts spaces in multiline literals
Roger Serwy added the comment: I applied the patch and it failed against the attached "tab_test.py" file. For reference, every '\t' in the file is followed by "Tab". -- nosy: +serwy Added file: http://bugs.python.org/file24074/tab_test.py ___ Python tracker <http://bugs.python.org/issue12930> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9925] Idle doesn't launch
Roger Serwy added the comment: This bug looks almost identical to issue4625 which was fixed. The only difference is the French localization aspect. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue9925> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13532] In IDLE, sys.stdout.write and sys.stderr can write any pickleable object
Roger Serwy added the comment: This bug is related to #1757057. -- ___ Python tracker <http://bugs.python.org/issue13532> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13644] Python 3 crashes (segfaults) with this code.
Roger Serwy added the comment: With Python 2, I can inspect the error to see where it occurred using traceback. With Python 3, I'd need to use gdb. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue13644> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5492] Error on leaving IDLE with quit() or exit() under Linux
Roger Serwy added the comment: The attached patch fixes the problem. The close method does not need to wait for poll_subprocess rescheduling to stop. The subprocess will be killed, which would cause the socket to timeout. With closing=True, poll_subprocess will return and not reschedule. -- keywords: +patch Added file: http://bugs.python.org/file24077/issue5492.patch ___ Python tracker <http://bugs.python.org/issue5492> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13052] IDLE: replace ending with '\' causes crash
Roger Serwy added the comment: issue13052.patch against 3.3a0 fixes the replace dialog. It also stops "Replace All" from closing the dialog. (What other application actually does this?) When 'Regular Expression' is not checked, the find and the replace dialogs treat the fields as raw strings. This is consistent with Terry's description of "Normal". When checked, the find field is treated as a RE and the replace field has "expand" applied. I think this behavior is a good compromise as it allows for the basic effect of "Extended" when 'Regular Expression' is checked. Also, I can not reproduce the beeping issue as being exclusive to '\'. I know it's caused by "text.bell()", but the bell occurs at appropriate times based on where it's located in the code (i.e. no more search results, find-again returns previous match, etc). -- Added file: http://bugs.python.org/file24080/issue13052.patch ___ Python tracker <http://bugs.python.org/issue13052> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9039] IDLE and module Doc
Roger Serwy added the comment: Is this still an issue? -- nosy: +serwy type: crash -> behavior ___ Python tracker <http://bugs.python.org/issue9039> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13654] IDLE: Freezes and/or crash on SyntaxWarning... is used prior to global declaration
Roger Serwy added the comment: I ran IDLE with a console and then ran your script against the latest release. The error message is due to a bug in idle_showwarning. Your script works with the development version, however. This is a duplicate of issue12438 which was fixed in e9c406a53972, but not yet released. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue13654> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13657] IDLE doesn't support sys.ps1 and sys.ps2.
Roger Serwy added the comment: This would make the IDLE shell interface more consistent with the original interpreter. Presently, the ">>> " prompt is faked by "showprompt" in PyShell.py. It relies on "sys" from the IDLE gui process and not from the "sys" in the subprocess, so mimicking the changed prompt would require querying the subprocess for its sys.ps1 and sys.ps2. The "enter_callback" method will need modification to remove sys.ps2 from the text buffer before execution. Also, EditorWindow.py has code for handling sys.ps1 in "smart_backspace_event" and "newline_and_indent_event". If anything, this shell-specific, prompt-handling code needs some refactoring as it should only be in PyShell.py, not in EditorWindow.py. Issue13039 is a result of prompt code side-effects in EditorWindow.py. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue13657> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6092] Changed Shortcuts don't show up in menu
Roger Serwy added the comment: This only applies to menu items from extensions (in this case, ScriptBinding.py). Other events (Copy, Cut, Paste, etc) update the menu shortcut properly. IDLE handles bindings for extensions separately from built-in functions. As a consequence, bindings for extensions do not get saved with custom key maps in ~/.idlerc/config-keys.cfg, but instead in ~/.idlerc/config-extensions.cfg. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue6092> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13657] IDLE doesn't support sys.ps1 and sys.ps2.
Roger Serwy added the comment: > Is that sensibly possible? Any line of code can change those, so IDLE would > have to do the equivalent of idle.ps1,idle.ps2 = sys.ps1, sys.ps2 before > every new ps1 statement prompt. It may be possible if the code gets refactored such that the subprocess handles the prompt and has stdin/stdout/stderr through RPCProxy treat the PyShell text widget as a dumb terminal. > I would rather remove the prompts from the entry window itself, and use 4 > char indents instead of 8, so that cutting does not pick up the prompts. > IDLE does not have to exactly imitate the Command Window interface. It could > also give the user a choice. This is #11838 and #1178. -- ___ Python tracker <http://bugs.python.org/issue13657> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13644] Python 3 aborts with this code.
Roger Serwy added the comment: This is identical to issue6028 and may be related to issue3555. -- ___ Python tracker <http://bugs.python.org/issue13644> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7338] recursive __attribute__ -> Fatal Python error: Cannot recover from stack overflow.
Roger Serwy added the comment: This is related to #13644. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue7338> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13659] Add a help() viewer for IDLE's Shell.
Roger Serwy added the comment: If you're on Linux, run this as your first command in IDLE: import pydoc; pydoc.pager = lambda text: pydoc.tempfilepager(pydoc.plain(text), 'xterm -e less') If Windows: import pydoc; pydoc.pager = lambda text: pydoc.tempfilepager(pydoc.plain(text), 'notepad') All help() output for objects will now display outside of IDLE. The Squeezer extension does something similar for output that is longer than 30 lines. It should be possible to create a custom pager for the subprocess which communicates with IDLE to display this text. RPCProxy could be used to accomplish this in conjunction with the textView module. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue13659> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13675] IDLE won't open if it can't read recent-files.lst
Roger Serwy added the comment: This is a duplicate of issue4625 and was fixed. The silently failing is part of issue13582. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue13675> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9262] IDLE: Use tabbed shell and edit windows
Roger Serwy added the comment: Attached is an extension which provides tabbed windows for IDLE. It supports drag-and-drop reordering and separate windows. The implementation relies on monkey-patching a few subroutines and duck-typing for the toplevel window. The extension emulates each tab as if it were its own toplevel object. There can be flickering when switching tabs due to swapping the toplevel menu bar. This seems to be a limitation of Tk. -- Added file: http://bugs.python.org/file23050/TabExtension.py ___ Python tracker <http://bugs.python.org/issue9262> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5150] IDLE to support reindent.py
Roger Serwy added the comment: I grabbed the core of reindent.py and put it into an extension, unmodified. The original reindent.py will emit Indentation Errors if they exist. ScriptBinding already has nice code to handle these problems by highlighting the error, placing the cursor at the error, and presenting a message box. Rather than duplicate this code, this extension makes calls into ScriptBinding to check for syntax errors when the core reindent code throws exceptions. -- Added file: http://bugs.python.org/file19247/ReindentExtension.py ___ Python tracker <http://bugs.python.org/issue5150> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6014] No shell prompt when a graphics window that was started from IDLE is closed
Roger Serwy added the comment: This issue can be closed. The natural language toolkit uses Tk for its GUI, the same as IDLE. Under Ubuntu 8.10, IDLE is launched from the menu without a subprocess. Running nltk as described without a subprocess causes this problem. Try launching IDLE without "-n". -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue6014> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9262] IDLE: Use tabbed shell and edit windows
Changes by Roger Serwy : -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue9262> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface
Roger Serwy <[EMAIL PROTECTED]> added the comment: I rewrote the patch to better handle multi-line input. In rewriting the patch I realized that there can be many different ways to handle up/down key presses while the cursor is in the input region. Here is the behavior of this patch: For single line inputs: * If the cursor is at the end of the line, then up/down navigates the history. * If the cursor is not at the end of the line, then up/down places the cursor at the end, so that subsequent up/down navigates the history. For multi-line inputs: * If the cursor is at the end of the input and the input is in the history, then up/down navigates the history. * If the cursor is at the end of the input and the input is NOT in the history, then up will move the cursor up. * If the cursor is at the first line of the input, then up will be ignored. * If the cursor is on the last line of the input, then down will be ignored. If the cursor leaves the input area, either by pressing left at the start of the input area, or by clicking elsewhere in the text box, the up/down keys behave as they do now. If the cursor is outside the input area and a character key is pressed, the cursor is placed and the end of the input, and the character is placed there. Also, this patch fixes a subtle cursor placement bug when dealing with multi-line inputs. When navigating from line 2 to line 1 of a multi-line, the cursor can end up in the ">>>" prompt. This is fixed so that the cursor stays in the input area. Added file: http://bugs.python.org/file10641/PyShell.py.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2704> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered.
Changes by Roger Serwy <[EMAIL PROTECTED]>: -- nosy: serwy severity: normal status: open title: IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3851> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered.
New submission from Roger Serwy <[EMAIL PROTECTED]>: Pressing "Home" on Windows XP in the PyShell window places the cursor before ">>>" instead of after it. On Linux, this behaves correctly. The problem is in PyShell.py in the home_callback(). At line 1064: if event.state != 0 and event.keysym == "Home": return "event.state" returns 8 on Windows when Home is pressed, thus the callback never executes. Here are two solutions: event.mc_state != 0 or (event.state & 1) != 0 This fixes the problem on Windows, and still works under Linux. -- components: +IDLE type: -> behavior versions: +Python 2.5 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3851> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface
Roger Serwy added the comment: Rather than change the core code of IDLE, I've attached an extension to achieve terminal-like behavior. It provides a toggle to enable/disable. However, this extension as-is only works on the 2.x series, although it can be modified slightly to work on 3.x. -- Added file: http://bugs.python.org/file16661/Terminal.py ___ Python tracker <http://bugs.python.org/issue2704> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered.
Changes by Roger Serwy : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue3851> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface
New submission from Roger Serwy <[EMAIL PROTECTED]>: See attached diff file. Patching PyShell.py Version 1.2.1 PyShell ignores letter/number key presses when the cursor is not on the command line. Instead it should redirect any letter/number key presses to the command line. (Changed ModifiedUndoDelegator) Also, up/down arrow presses should scroll through history when the cursor is on the command line. But when the cursor is not on the command line, the arrow keys should move around the PyShell window. (Added new bindings with conditional logic) -- components: IDLE files: patch_PyShell.py messages: 65888 nosy: serwy severity: normal status: open title: IDLE: Patch to make PyShell behave more like a Terminal interface type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10124/patch_PyShell.py __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2704> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface
Roger Serwy <[EMAIL PROTECTED]> added the comment: Hi Terry, The patch allows you to select previous output if your cursor leaves the command line area. Press the left arrow button at a new command line does this. Thank you for your feedback! - RDS Terry J. Reedy wrote: > Terry J. Reedy <[EMAIL PROTECTED]> added the comment: > > I like the two changes: jump to command line and scroll previous command > lines without having to search back up through the output. Just don't > imitate the Windows terminal too closely with its inability to just > select previous output (without Symbol/Edit/Mark). > > -- > nosy: +tjreedy > > __ > Tracker <[EMAIL PROTECTED]> > <http://bugs.python.org/issue2704> > __ > > __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2704> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45804] IDLE - faster shell writing
New submission from Roger Serwy : The shell provided by IDLE uses synchronous sys.stdout.write() calls between the subprocess and the front-end, leading to very slow writes. The provided patch proposes buffering the stdout/stderr streams in the subprocess and then sending a single update after 50ms. The patch also provides back pressure on the buffer so that it doesn't grow without bound. When trying the behavior of the patch, disable the squeezer extension, or set its limit to 1000. Then in the shell, run: for i in range(500): print(i) The output will instantly appear in the shell. -- files: idlelib_buffer_output.patch keywords: patch messages: 406306 nosy: roger.serwy, terry.reedy priority: normal severity: normal stage: patch review status: open title: IDLE - faster shell writing type: enhancement versions: Python 3.10 Added file: https://bugs.python.org/file50438/idlelib_buffer_output.patch ___ Python tracker <https://bugs.python.org/issue45804> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45804] IDLE - faster shell writing
Roger Serwy added the comment: All good questions, Terry! I do have a git clone of the cpython repo, but I haven't worked through the new commit/patch process since Mercurial. I'm a bit rusty. The buffering provided is for calls to `write`. It does not do any line buffering. Calls to `isatty` will behave the same. The negative side effect is that the subprocess will proceed as if writes have been committed to the PyShell window, so any pending transfers can be lost if the subprocess terminates unexpectedly. I used a separate OS thread to handle the transfer of the writes rather than using the Tcl/Tk event loop. The Tcl/Tk loop runs on the main thread, so any long-running processes will prevent a `.after` callback function from being called. The base class was not changed. I haven't followed all the changes to the stream class (and its implications) since 3.5, so the code subclasses the newer `StdOutputFile` class to minimize disruption. -- ___ Python tracker <https://bugs.python.org/issue45804> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13495] IDLE: Regressions - Two ColorDelegator instances loaded and -e no longer edits new files.
Roger Serwy added the comment: There was another regression introduced by (a4bd8a4805a8). IDLE 3 no longer allows for editing of new files from the command line. For example: idle -e /tmp/newfile.py will momentarily flash an editor window before it is closed. This is due to "good_load" not being set. What's worse is that the IDLE process will continue running without having any visible windows open. The rev2 patch removes the "good_load" flag and fixes the ColorDelegator issue. I understand the purpose of the original code is to avoid displaying a blank editor in case of a decode error. The rev2 patch reintroduces this behavior. In my opinion, that behavior is not a serious problem. -- nosy: +terry.reedy title: IDLE: Regression - Two ColorDelegator instances loaded -> IDLE: Regressions - Two ColorDelegator instances loaded and -e no longer edits new files. Added file: http://bugs.python.org/file24243/issue13495_rev2.patch ___ Python tracker <http://bugs.python.org/issue13495> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13798] Pasting and then running code doesn't work in the IDLE Shell
Roger Serwy added the comment: This is a duplicate of #3559. -- nosy: +serwy ___ Python tracker <http://bugs.python.org/issue13798> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com