[issue26568] Add a new warnings.showwarnmsg() function taking a warnings.WarningMessage object
Change by irdb : -- nosy: +irdb ___ Python tracker <https://bugs.python.org/issue26568> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19495] context manager for measuring duration of blocks of code
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue19495> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue30024> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14551] imp.load_source docs removed from python3 docs...is this correct?
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue14551> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29459] `__contains__` and `get` methods for match objects?
New submission from irdb: __getitem__ was added to match objects as a resolution of issue24454. Wouldn't it be nice to also have `__contains__` and `get` methods for match objects? Is it even feasible to implement them in neat way? They should work similar to dictionaries, i.e: ``` match = re.match('(?Pa)', 'a') match.get('b') # should return None match.get(1) # should return 'a' 'a' in match # True 'b' in match # False ``` ------ components: Library (Lib) messages: 287096 nosy: eric.smith, irdb, mrabarnett, serhiy.storchaka priority: normal severity: normal status: open title: `__contains__` and `get` methods for match objects? type: enhancement versions: Python 3.7 ___ Python tracker <http://bugs.python.org/issue29459> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14965] super() and property inheritance behavior
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue14965> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10399] AST Optimization: inlining of function calls
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue10399> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17301] An in-place version of many bytearray methods is needed
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue17301> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1647489] zero-length match confuses re.finditer()
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue1647489> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2506] Add mechanism to disable optimizations
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue2506> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue1602> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24454] Improve the usability of the match object named group API
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue24454> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9618] IDLE shell ignores all but first statement
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue9618> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18766] IDLE: Autocomplete in editor doesn't work for un-imported modules
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue18766> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26728] make pdb.set_trace() accept debugger commands as arguments and run them after entering the debugger
New submission from irdb: I usually insert the following line in the middle of code to start the debugger from there: import pdb; pdb.set_trace() More often than not, I need to run some commands immediately after entering the debug mode, e.g. watch (display) some variables, create some additional break points, etc. AFAIK currently you have to enter those commands manually on each run and there is no simple way to pass those commands from the source code. Of-course one can invoke pdb as a script ("python3 -m pdb -c ...") and pass the desired commands to the script. But still using pdb.set_trace() is a popular method and I think it would be very useful to have set_trace() accept a list of strings as arguments and execute them right after entering the debugger. -- components: Interpreter Core messages: 263135 nosy: irdb priority: normal severity: normal status: open title: make pdb.set_trace() accept debugger commands as arguments and run them after entering the debugger type: enhancement versions: Python 3.6 ___ Python tracker <http://bugs.python.org/issue26728> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13504] Meta-issue for "Invent with Python" IDLE feedback
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue13504> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue694339] IDLE: Dedenting with Shift+Tab
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue694339> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue2704> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5150] IDLE to support reindent.py
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue5150> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22742] IDLE shows traceback when printing non-BMP character
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue22742> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF)
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue21084> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue13153> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23220] Documents input/output effects of how IDLE runs user code
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue23220> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25522] IDLE: warn if save-as name matches stdlib name
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue25522> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7676] IDLE shell shouldn't use TABs
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue7676> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1794] Hot keys must work in any keyboard layout
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue1794> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Adding a new regex module (compatible with re)
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue2636> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10972] zipfile: add "unicode" option to the force the filename encoding to UTF-8
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue10972> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10614] ZipFile: add a filename_encoding argument
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue10614> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active.
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue15348> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24455] IDLE debugger causes crash if not quitted properly before next run
Changes by irdb : -- type: -> crash ___ Python tracker <http://bugs.python.org/issue24455> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24455] IDLE debugger causes crash if not quitted properly before next run
New submission from irdb: # Open a module using IDLE # Run the module (Press F5) # Activate the debugger ([DEBUG ON]) # Set a breakpoint in the module # Run the module again # Run the module for the third time # Hit the Quit button in Debug Control window (twice, as the first click appears to do nothing) Congratulations! You got yourself a crash! After a while, a window dialogue appears asking "Do you want to end this process?". Click "End Process" (As there doesn't seem to be any other way). One way to avoid this crash is to press quit before the third run. But even without it, this shouldn't happen. Sometimes the programmer may simply forget that there is an active debugger running... I'm using Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32 (Windows 8.1) -- components: IDLE messages: 245384 nosy: irdb priority: normal severity: normal status: open title: IDLE debugger causes crash if not quitted properly before next run versions: Python 3.4 ___ Python tracker <http://bugs.python.org/issue24455> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24448] Syntax highlighting marks multiline comments as strings
New submission from irdb: It has been suggested by BDFL to use triple-quoted strings as multiline comments.[1] Allegedly, some editors already makes a distinction between these kind of comments and docstring and highlight them differently. It would be nice if IDLE could also highlight these kind of comments with the same color as the other single-line comments. [1]: https://stackoverflow.com/posts/7696966/revisions -- components: IDLE messages: 245334 nosy: irdb priority: normal severity: normal status: open title: Syntax highlighting marks multiline comments as strings type: behavior versions: Python 3.4 ___ Python tracker <http://bugs.python.org/issue24448> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue219960] Problems with Tcl/Tk and non-ASCII text entry
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue219960> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1442493] IDLE shell window gets very slow when displaying long lines
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue1442493> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6143] IDLE - an extension to clear the shell window
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue6143> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19042] Idle: add option to autosave 'Untitled' edit window
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue19042> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24090] Add a "copy variable to clipboard" option to the edit menu
New submission from irdb: I suggest adding a "Copy variable to clipboard" menu option to the edit menu of IDLE. Sometimes I need to copy a variable to clipboard, but because the variable is so long, printing it in the IDLE window makes IDLE sluggish and then selecting and copying the printed value becomes a little cumbersome. Of-coarse as it is suggested in [1], I can do copy the variable `v` using the following commands: from Tkinter import Tk r = Tk() r.withdraw() r.clipboard_clear() r.clipboard_append(str(v)) r.destroy() but I think it's too much and it would be nice to have such menu option that after clicking on it a dialog box appears asking for variable name and after entering the name causes the str content of the variable to be copied to the clipboard. [1]: https://stackoverflow.com/questions/579687/how-do-i-copy-a-string-to-the-clipboard-on-windows-using-python -- components: IDLE messages: 242303 nosy: irdb priority: normal severity: normal status: open title: Add a "copy variable to clipboard" option to the edit menu type: enhancement versions: Python 3.4 ___ Python tracker <http://bugs.python.org/issue24090> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19625] IDLE 2.7 should use UTF-8 as it's default encoding
irdb added the comment: On cmd and powershell: >python -c "import sys; print(sys.getdefaultencoding());" utf-8 >python -c "import sys; print(sys.stdout.encoding);" cp720 In IDLE: >>> import sys; print(sys.getdefaultencoding()); utf-8 >>> sys.stdout.encoding 'cp1256' -- ___ Python tracker <http://bugs.python.org/issue19625> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19625] IDLE 2.7 should use UTF-8 as it's default encoding
irdb added the comment: Although in Python 3 IDLE can indeed print UTF-8 characters. But still sys.stdout.encoding == locale.getpreferredencoding() != 'utf-8'. >>> sys.stdout.encoding 'cp1256' Shouldn't it be 'utf-8'? -- ___ Python tracker <http://bugs.python.org/issue19625> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22408] Tkinter doesn't handle Unicode dead key combinations on Windows
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue22408> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4823] idle height and place
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue4823> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3286] IDLE opens window too low on Windows
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue3286> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16893] Generate Idle help from Doc/library/idle.rst
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue16893> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default.
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue17535> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue433030] SRE: Atomic Grouping (?>...) is not supported
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue433030> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3559] Pasted \n not same as typed \n
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue3559> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1178] IDLE - add "paste code" functionality
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue1178> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16296] Patch to fix building on Win32/64 under VS 2010
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue16296> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21612] IDLE should not open multiple instances of one file
irdb added the comment: Yes, I am right-clicking the file through Windows Explorer as in some situations it seems much faster. (Opening through IDLE's file menu in a particular process works fine) If this is supposed to be so please close the issue. Although I don't understand why one would want this feature. This is not the case when I use Adobe Reader to open a pdf file, Notepad++ to open a text file, or MS Word to open a .doc file. I'm using Windows 8 x64/Python 2.7.6 (32 bit version) -- type: -> behavior versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue21612> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21612] IDLE should not open multiple instances of one file
Changes by irdb : -- title: IDLE should should not open multiple instances of one file -> IDLE should not open multiple instances of one file ___ Python tracker <http://bugs.python.org/issue21612> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21612] IDLE should should not open multiple instances of one file
New submission from irdb: Currently users can open multiple instances of one file in IDLE. Sometimes this leads to confusion and may cause loss of data. I'm not aware of any benefits of this behavior and I think it's better to be prevented by IDLE. Here are the steps to recreate the situation: 1. Create a file named "xyz.py" 2. Right-click on the file and open it with IDLE 3. Add some text 4. Goto 2. 5. Save and close both open IDLE windows. (Your work on the first saved file will be lost.) -- components: IDLE messages: 219392 nosy: irdb priority: normal severity: normal status: open title: IDLE should should not open multiple instances of one file ___ Python tracker <http://bugs.python.org/issue21612> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15809] IDLE console uses incorrect encoding.
irdb added the comment: Thank you Serhiy for working on this. This patch solves the problem when all your input characters are encodable using system preferred encoding. But issue19625 persists. I still can't print something like 'Русский текст' in interactive mode. Another problem is that output of interactive mode and running a module is different if source encoding is something other that system's default. For example: (With current patch) in interactive mode: >>> print 'آ' آ >>> print u'آ' آ But in when running same commands from a file with utf-8 encoding: ط¢ آ I know, you siad to use cp1256 encoding in my source file. But I really prefer to work with utf-8 than working with a codepage that is not fully compatible with my language and I believe many other programmers are the same as me (even if there is a codepage they can work with). (cp1256 is only for Arabic, but (when a program does not support unicode) Microsoft uses it as a second option for some other similar languages like Urdu, Persian. But it does not include all the characters they need.) IMO these two problems -- being a able to type any Unicode characters in interactive mode and getting the same output as running modules -- are more important than a mere representation problem in interactive mode. (and considering that I use utf-8 for my source files, both of them were solved by martin's patch. [Of course I'm not saying it's the solution, just that it worked better for me]) -- ___ Python tracker <http://bugs.python.org/issue15809> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15809] IDLE console uses incorrect encoding.
irdb added the comment: Well, if there is no other way around this, I think it's better to apply Martin's patch. At least then we will be able to enter any valid utf-8 character in IDLE (although print statement won't print correctly unless the string is decoded first). (As a Windows user, currently I can't print u'йцук' in interactive mode and get an "Unsupported characters in input" error because my default system encoding (cp1256) can't encode Russian.) Also it will be more Unicode friendly which is not a bad thing. -- ___ Python tracker <http://bugs.python.org/issue15809> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19625] IDLE should use UTF-8 as it's default encoding
New submission from irdb: >>> s = 'ی' Unsupported characters in input I'm using windows 8 and Python 2.7.6. The same line works perfectly if I save it in a module with encoding set to UTF-8; but it's really annoying that I can't test my code directly in IDLE. -- components: IDLE messages: 203047 nosy: irdb priority: normal severity: normal status: open title: IDLE should use UTF-8 as it's default encoding versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue19625> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1519638] Unmatched Group issue - workaround
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue1519638> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18875] Automatic insertion of the closing parentheses, brackets, and braces
New submission from irdb: Many other IDE's have this feature that allows automatic insertion of closing parentheses as user is typing something. I think it saves time and increases programming speed. Is it possible to have this on IDLE, too? -- components: IDLE messages: 196456 nosy: irdb priority: normal severity: normal status: open title: Automatic insertion of the closing parentheses, brackets, and braces type: enhancement versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue18875> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15809] IDLE console uses incorrect encoding.
irdb added the comment: I really think this information might help, if not, I promise not to post anything else. :) This is a sample program I run: ''' # -*- coding: utf-8 -*- import sys import locale de = sys.getdefaultencoding() pd = locale.getpreferredencoding() print de, pd s1 = 'سلام' print s1 s2 = u'سلام' print s2 ''' I tried to run it before and after applying suggested patches. Before applying any patch: ''' Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> RESTART >>> ascii cp1256 ط³ظ„ط§ظ… سلام >>> s3 = 'سلام' >>> s4 = u'سلام' >>> s3 '\xd3\xe1\xc7\xe3' >>> s4 u'\xd3\xe1\xc7\xe3' >>> print s3 سلام >>> print s4 ÓáÇã >>> s = u'Русский текст' Unsupported characters in input ''' After applying loewis's patch: ''' Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> RESTART >>> ascii cp1256 ط³ظ„ط§ظ… سلام >>> s3 = 'سلام' >>> s4 = u'سلام' >>> s3 '\xd8\xb3\xd9\x84\xd8\xa7\xd9\x85' >>> s4 u'\u0633\u0644\u0627\u0645' >>> print s3 ط³ظ„ط§ظ… >>> print s4 سلام >>> s = u'Русский текст' >>> print s Русский текст >>> ''' After applying serhiy.storchaka's patch: ''' Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> RESTART >>> ascii cp1256 ط³ظ„ط§ظ… سلام >>> s3 = 'سلام' >>> s4 = u'سلام' >>> s3 '\xd3\xe1\xc7\xe3' >>> s4 u'\u0633\u0644\u0627\u0645' >>> print s3 سلام >>> print s4 سلام >>> s = u'Русский текст' Unsupported characters in input ''' My point is that printing s3 and s4 in interactive mode, should produce the same results as printing s1 and s2 from source file. Loewis's patch handled this as I expected. Also this patch solves my problem of not being able to print u'Русский текст' (that is due to my Windows locale being set to Persian, not Russian.) -- ___ Python tracker <http://bugs.python.org/issue15809> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15809] IDLE console uses incorrect encoding.
irdb added the comment: Oops! My problem is that I get "Unsupported characters in input" when trying to type any Unicode string in IDLE's interactive mode. e.g. a simple command like: s = u'Русский текст' gives: Unsupported characters in input Probably unrelated to the issue at hand. I don't know how I ended up in this thread. Again, sorry. -- ___ Python tracker <http://bugs.python.org/issue15809> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15809] IDLE console uses incorrect encoding.
irdb added the comment: Sorry, it's probably has the same problem as what Martin suggested. Although I think it's better than having program interrupted. -- ___ Python tracker <http://bugs.python.org/issue15809> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15809] IDLE console uses incorrect encoding.
irdb added the comment: How about passing on UnicodeError? Will it cause other problems? -- Added file: http://bugs.python.org/file31400/PyShell.py.patch ___ Python tracker <http://bugs.python.org/issue15809> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17348] Unicode - encoding seems to be lost for inputs of unicode chars in IDLE
Changes by irdb : -- nosy: +irdb ___ Python tracker <http://bugs.python.org/issue17348> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com