[issue46666] IDLE Add indent guide
Aivar Annamaa added the comment: The guides could be implemented by tagging the indentation characters in the Text widget with tags configured with suitable bgstipple (https://www.tcl.tk/man/tcl/TkCmd/text.html#M45) bitmaps. I had some success with this in Thonny IDE, but abandoned the plan because bstipple is not supported on macOS (for some reason). -- nosy: +aivarannamaa ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46062] tkinter.filedialog.SaveAs: create new folder on Ubuntu?
Aivar Annamaa added the comment: You may want to use zenity in a subprocess instead of this dialog in Linux, but this has its own problems (appearing behind other windows occasionally) -- nosy: +aivarannamaa ___ Python tracker <https://bugs.python.org/issue46062> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45732] Make python.org Windows and macOS installers use Tk 8.6.12
Aivar Annamaa added the comment: Do I understand properly, that the macOS build hasn't been updated yet? It would be really great if Python 3.10.1 for macOS would come with Tcl/Tk 8.6.12, as it is supposed to fix a nasty crash with Spanish keyboard. -- ___ Python tracker <https://bugs.python.org/issue45732> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45732] Make python.org Windows and macOS installers use Tk 8.6.12
Change by Aivar Annamaa : -- nosy: +aivarannamaa ___ Python tracker <https://bugs.python.org/issue45732> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45817] Build Windows and macOS installers with Tcl/Tk 8.6.12
Aivar Annamaa added the comment: Sorry, duplicate of #45732 -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue45817> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45817] Build Windows and macOS installers with Tcl/Tk 8.6.12
Change by Aivar Annamaa : -- type: -> enhancement ___ Python tracker <https://bugs.python.org/issue45817> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45817] Build Windows and macOS installers with Tcl/Tk 8.6.12
New submission from Aivar Annamaa : New version contains several bugfixes: https://github.com/tcltk/tk/blob/8baf7d337ca0aab7fafb0e670927ab2c0200e80a/changes#L7869 -- assignee: terry.reedy components: IDLE, Tkinter, Windows, macOS messages: 406409 nosy: aivarannamaa, ned.deily, paul.moore, ronaldoussoren, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal status: open title: Build Windows and macOS installers with Tcl/Tk 8.6.12 versions: Python 3.10, Python 3.11 ___ Python tracker <https://bugs.python.org/issue45817> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45372] Unwarranted "certificate has expired" when urlopen-ing R3 sites
Aivar Annamaa added the comment: I was not able to find out why one of my Windows box failed to update the certificate store, but I was able to work around this by manually installing https://letsencrypt.org/certs/lets-encrypt-r3.der It looks like this is actually a Windows problem, so I'm closing this issue. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue45372> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45372] Unwarranted "certificate has expired" when urlopen-ing R3 sites
Aivar Annamaa added the comment: I can list the root certs with certmgr, but I'm not sure which piece to investigate further. Even if there is problem with installed certs, it's interesting, why doesn't it bother the browsers and requests? Maybe this is opportunity to make something better in urllib? -- ___ Python tracker <https://bugs.python.org/issue45372> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45372] Unwarranted "certificate has expired" when urlopen-ing R3 sites
New submission from Aivar Annamaa : In one of my Windows 10 computers I'm not able to urlopen sites which use R3 certificates. The same is reported by several of the users of my software. Following is taken from a session in the fresh IDLE 3.10 in up-to date Windows 10: Python 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 18:46:30) [MSC v.1929 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license()" for more information. >>> from urllib.request import urlopen >>> urlopen("https://openssl.org;) Traceback (most recent call last): File "C:\Python310-32\lib\urllib\request.py", line 1348, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "C:\Python310-32\lib\http\client.py", line 1276, in request self._send_request(method, url, body, headers, encode_chunked) File "C:\Python310-32\lib\http\client.py", line 1322, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "C:\Python310-32\lib\http\client.py", line 1271, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "C:\Python310-32\lib\http\client.py", line 1031, in _send_output self.send(msg) File "C:\Python310-32\lib\http\client.py", line 969, in send self.connect() File "C:\Python310-32\lib\http\client.py", line 1448, in connect self.sock = self._context.wrap_socket(self.sock, File "C:\Python310-32\lib\ssl.py", line 512, in wrap_socket return self.sslsocket_class._create( File "C:\Python310-32\lib\ssl.py", line 1070, in _create self.do_handshake() File "C:\Python310-32\lib\ssl.py", line 1341, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in urlopen("https://openssl.org;) File "C:\Python310-32\lib\urllib\request.py", line 216, in urlopen return opener.open(url, data, timeout) File "C:\Python310-32\lib\urllib\request.py", line 519, in open response = self._open(req, data) File "C:\Python310-32\lib\urllib\request.py", line 536, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "C:\Python310-32\lib\urllib\request.py", line 496, in _call_chain result = func(*args) File "C:\Python310-32\lib\urllib\request.py", line 1391, in https_open return self.do_open(http.client.HTTPSConnection, req, File "C:\Python310-32\lib\urllib\request.py", line 1351, in do_open raise URLError(err) urllib.error.URLError: In the same session, requests works fine: >>> import requests >>> requests.get("https://openssl.org;) It's really weird, that in my another Windows 10, also 64-bit, having same state of updates, using same version of Python 3.10, connected to the same network -- everything works fine. Neither of the computers use any extra network middleware or proxies. In both computers Chrome and Firefox are happy with the certificate of https://openssl.org Same applies to Python 3.7 It must be somehow related to https://www.fortinet.com/blog/psirt-blogs/fortinet-and-expiring-lets-encrypt-certificates -- messages: 403208 nosy: aivarannamaa priority: normal severity: normal status: open title: Unwarranted "certificate has expired" when urlopen-ing R3 sites versions: Python 3.10, Python 3.7 ___ Python tracker <https://bugs.python.org/issue45372> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44350] Make IDLE support Command-click on window title on macOS
Change by Aivar Annamaa : -- title: Support Command-click on window title on macOS -> Make IDLE support Command-click on window title on macOS ___ Python tracker <https://bugs.python.org/issue44350> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44350] Support Command-click on window title on macOS
Aivar Annamaa added the comment: In short: window.wm_attributes("-titlepath", stringContainingTheAbsolutePathOfTheDocument) Passing empty string as the second argument turned the feature off. -- ___ Python tracker <https://bugs.python.org/issue44350> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44350] Support Command-click on window title on macOS
New submission from Aivar Annamaa : Many macOS apps show location info about current document on command-clicking on window title. I just found out how to do it in Tkinter, so I wanted to share it in case someone wants to add it for IDLE: https://sourceforge.net/p/tcl/mailman/tcl-mac/thread/CAEbkakfc%2B5hUGMyWpjGF2DO7dWOX-3AyR8UOjGfbP8djWWtG-A%40mail.gmail.com/#msg37298382 -- assignee: -> terry.reedy components: +IDLE nosy: +terry.reedy title: Support -> Support Command-click on window title on macOS ___ Python tracker <https://bugs.python.org/issue44350> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44350] Support
Change by Aivar Annamaa : -- nosy: Aivar.Annamaa priority: normal severity: normal status: open title: Support ___ Python tracker <https://bugs.python.org/issue44350> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43511] tkinter with Tk 8.6.11 is slow on macOS
Aivar Annamaa added the comment: According to Tk people, the regression in performance was unavoidable and the solution is to avoid relying on update in a loop: https://core.tcl-lang.org/tk/tktview/f642d7c0f4 -- nosy: +Aivar.Annamaa ___ Python tracker <https://bugs.python.org/issue43511> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42068] For macOS, package the included Tcl and Tk frameworks in a rational way.
Change by Aivar Annamaa : -- nosy: +Aivar.Annamaa ___ Python tracker <https://bugs.python.org/issue42068> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41548] Tk Window rendering on macOS Big Sur
Aivar Annamaa added the comment: A related discussion is here: https://core.tcl-lang.org/tk/tktview/dcb35fbd78a0bc31ad409cf717f16a472ca3f627 -- nosy: +Aivar.Annamaa ___ Python tracker <https://bugs.python.org/issue41548> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39107] Upgrade tcl/tk to 8.6.10 (Windows and maxOS)
Aivar Annamaa added the comment: According to the comments under https://github.com/python/cpython/pull/18982 there is no point in creating a PR, so I'll just share my experiences. I was able to build current master with Tcl/Tk 8.6.10 both on Windows 10 (64-bit) and on macOS Catalina. I ran the tests on Windows and no Tkinter-related tests failed. I tested it manually on both platforms by poking around in IDLE and Thonny IDE and saw no (big) issues. (The only regression I saw in Thonny was Toplevel tooltips gaining a title bar, but I could solve it by adding a "wm_overrideredirect(1)"). One of the new features on macOS -- support for dark mode -- looked nice. Half-baked emoji support had not regressed at least. I really hope you'll find time to include Tk 8.6.10 in the last beta of Python 3.9! -- ___ Python tracker <https://bugs.python.org/issue39107> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39107] Consider building Tkinter with Tk 8.6.10
Change by Aivar Annamaa : -- title: Consider upgrading Tkinter to Tk 8.6.10 -> Consider building Tkinter with Tk 8.6.10 ___ Python tracker <https://bugs.python.org/issue39107> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39107] Consider upgrading Tkinter to Tk 8.6.10
Change by Aivar Annamaa : -- assignee: -> terry.reedy components: +IDLE nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue39107> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39107] Consider upgrading Tkinter to Tk 8.6.10
New submission from Aivar Annamaa : It includes several Mac-related enhancements https://sourceforge.net/projects/tcl/files/Tcl/8.6.10/tcltk-release-notes-8.6.10.txt/view -- components: Tkinter messages: 358702 nosy: Aivar.Annamaa priority: normal severity: normal status: open title: Consider upgrading Tkinter to Tk 8.6.10 type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue39107> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode
Aivar Annamaa added the comment: >>> '\N{PERSONAL COMPUTER}' freezes IDLE 3.7.6 (64-bit, downloaded from python.org) on macOS 10.15 Can it be because Tk 8.6.8 is still used there? -- nosy: +Aivar.Annamaa ___ Python tracker <https://bugs.python.org/issue13153> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34455] Tkinter crashing when pressing Command + ^ (OSX)
Aivar Annamaa added the comment: > to conditionallly bind '' to a function that returns 'break' I tried capturing all events. The handler was called for Cmd press, but the crash occurred before the handler was called for the other key. -- ___ Python tracker <https://bugs.python.org/issue34455> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34455] Tkinter crashing when pressing Command + ^ (OSX)
Aivar Annamaa added the comment: I created the ticket: https://core.tcl-lang.org/tk/tktview/5849df7852c48cb763b11a11d848a68482b0f828 -- nosy: +Aivar.Annamaa ___ Python tracker <https://bugs.python.org/issue34455> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s
Aivar Annamaa added the comment: > in my opinion the col_offsets of the two nodes should be 1 and 3, > respectively (the positions of the operators) This would not match the documentation: > one can get the source segment of a one-line expression node using > source_line[node.col_offset : node.end_col_offset] -- ___ Python tracker <https://bugs.python.org/issue18374> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35101] inspect.findsource breaks on class frame objects
Change by Aivar Annamaa : -- nosy: +Aivar.Annamaa ___ Python tracker <https://bugs.python.org/issue35101> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33416] Add endline and endcolumn to every AST node
Aivar Annamaa added the comment: I strongly support this feature, because my IDE (https://thonny.org) needs to highlight AST nodes in the source code. There would be many interested parties if you count the stars of this project: https://github.com/gristlabs/asttokens -- nosy: +Aivar.Annamaa ___ Python tracker <https://bugs.python.org/issue33416> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1)
Aivar Annamaa added the comment: Can it be caused by https://github.com/python/cpython/commit/adf493227f1efd5d6b34f46b854142bf3b5a411c ? -- ___ Python tracker <https://bugs.python.org/issue34927> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1)
Aivar Annamaa added the comment: I got the segfault with Tk 8.6, provided with python.org installer. -- ___ Python tracker <https://bugs.python.org/issue34927> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1)
Aivar Annamaa added the comment: Looks like the workaround is to provide explicit `parent` named argument to the dialog call. -- ___ Python tracker <https://bugs.python.org/issue34927> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1)
Aivar Annamaa added the comment: Here is a simple application that also exposes this problem. Click at the button and press Escape when dialog appears. import tkinter as tk import tkinter.filedialog as fd root = tk.Tk() def dostuff(): fd.askopenfile() bt = tk.Button(root, text="Click me!", command=dostuff) bt.grid() root.mainloop() -- ___ Python tracker <https://bugs.python.org/issue34927> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34927] Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1)
New submission from Aivar Annamaa : After switching from Python 3.7.0 to 3.7.1rc1 (macOS, 64-bit only downloaded from python.org), my rather big Tkinter application started to segfault whenever I close a system dialog (eg. the one created by askopenfilename or showerror) by keypress (eg. Escape or Enter). The crash does not happen when I close the dialog with mouse click. The code that calls the dialog runs fine, and the crash seems to happen next time the control goes back to Tk mainloop. It looks like the keypress performed in the dialog somehow remains in Tk event queue. Here is the system log for main thread, (more detailed information can be seen at https://bitbucket.org/plas/thonny/issues/545/quit): Crashed Thread:0 Dispatch queue: com.apple.main-thread Exception Type:EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x Exception Note:EXC_CORPSE_NOTIFY VM Regions Near 0: --> __TEXT 00010ab7e000-00010ab7f000 [4K] r-x/rwx SM=COW /Users/USER/Desktop/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x7fff97e1a8ea __kill + 10 1 libsystem_platform.dylib0x7fff96dba52a _sigtramp + 26 2 ??? 00 0 + 0 3 libtk8.6.dylib 0x00010b876e84 -[TKApplication(TKKeyEvent) tkProcessKeyEvent:] + 160 4 libtk8.6.dylib 0x00010b87d6d9 TkMacOSXEventsCheckProc + 360 5 libtcl8.6.dylib 0x00010b714d06 Tcl_DoOneEvent + 316 6 _tkinter.cpython-37m-darwin.so 0x00010b64501d _tkinter_tkapp_mainloop + 269 7 org.python.python 0x00010aba752e _PyMethodDef_RawFastCallKeywords + 430 8 org.python.python 0x00010abad192 _PyMethodDescr_FastCallKeywords + 82 9 org.python.python 0x00010ac6640c call_function + 780 10 org.python.python 0x00010ac6339c _PyEval_EvalFrameDefault + 25164 11 org.python.python 0x00010ac66f06 _PyEval_EvalCodeWithName + 2422 12 org.python.python 0x00010aba6a61 _PyFunction_FastCallKeywords + 257 13 org.python.python 0x00010ac663e2 call_function + 738 14 org.python.python 0x00010ac633b6 _PyEval_EvalFrameDefault + 25190 15 org.python.python 0x00010aba6ed0 function_code_fastcall + 128 16 org.python.python 0x00010ac663e2 call_function + 738 17 org.python.python 0x00010ac63457 _PyEval_EvalFrameDefault + 25351 18 org.python.python 0x00010ac66f06 _PyEval_EvalCodeWithName + 2422 19 org.python.python 0x00010ac5d074 PyEval_EvalCode + 100 20 org.python.python 0x00010ac5a65d builtin_exec + 557 21 org.python.python 0x00010aba752e _PyMethodDef_RawFastCallKeywords + 430 22 org.python.python 0x00010aba6a9a _PyCFunction_FastCallKeywords + 42 23 org.python.python 0x00010ac663d4 call_function + 724 24 org.python.python 0x00010ac63457 _PyEval_EvalFrameDefault + 25351 25 org.python.python 0x00010ac66f06 _PyEval_EvalCodeWithName + 2422 26 org.python.python 0x00010aba6a61 _PyFunction_FastCallKeywords + 257 27 org.python.python 0x00010ac663e2 call_function + 738 28 org.python.python 0x00010ac63457 _PyEval_EvalFrameDefault + 25351 29 org.python.python 0x00010ac66f06 _PyEval_EvalCodeWithName + 2422 30 org.python.python 0x00010aba663b _PyFunction_FastCallDict + 523 31 org.python.python 0x00010acb8743 pymain_run_module + 147 32 org.python.python 0x00010acb7b47 pymain_main + 5303 33 org.python.python 0x00010acb868a _Py_UnixMain + 58 34 libdyld.dylib 0x7fff921c35ad start + 1 -- components: Tkinter messages: 327326 nosy: aivarannamaa priority: normal severity: normal status: open title: Tkinter-related segfault on macOS (regression between 3.7.0 and 3.7.1rc1) versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue34927> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6700] inspect.getsource() returns incorrect source lines at the module level
Change by Aivar Annamaa : -- title: inspect.getsource() returns incorrect source lines -> inspect.getsource() returns incorrect source lines at the module level versions: +Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue6700> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6700] inspect.getsource() returns incorrect source lines
Change by Aivar Annamaa : -- nosy: +Aivar.Annamaa ___ Python tracker <https://bugs.python.org/issue6700> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31394] Ellipsis_token.type != token.ELLIPSIS
Aivar Annamaa added the comment: Here is the PR: https://github.com/python/cpython/pull/3469 (It's my first, so I don't know if I should to also update NEWS file or add "skip news" label. I signed the CLA, so I hope this warning goes away.) -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31394> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31394] Ellipsis_token.type != token.ELLIPSIS
Aivar Annamaa added the comment: (Sorry, I didn't mean to challenge the authority of a core developer. I simply didn't notice that adding a comment reopens the issue. I hope this time I selected correct parameters and this doesn't happen again) I'm trying to rephrase my concern. Initially I thought there was a mistake in the tokenizer or in the token module. After you pointed out the documentation about token.OP and exact_type, I'm worried about a smaller detail. The documentation only talks about *operators* and *delimiters* having type attribute set to token.OP. According to my understanding (and also the listings at https://docs.python.org/3/reference/lexical_analysis.html#operators), ellipsis is neither operator nor delimiter. Am I right about this? (I understand that the source representation of both ELLIPSIS and DOT tokens contains period *character(s)*, but I don't see why is this relevant when we discuss the properties of *tokens*) Anyway, if ellipsis is neither operator nor delimiter, (and if there is a reason why it is treated similarly with operators and delimiters) then I recommend to update the documentation by replacing > all Operators and Delimiters tokens > are returned using the generic token.OP token type with > all Operators, Delimiters and Ellipsis tokens > are returned using the generic token.OP token type (I understand, that this is not a serious issue. If you prefer not to discuss it further then I'm happy to leave it as it is.) -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31394> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31394] Ellipsis_token.type != token.ELLIPSIS
Aivar Annamaa added the comment: But ellipsis is a distinct token, not a sequence of three period tokens. Also, I can't see how we could conceptually treat ellipsis as a delimiter or operator -- it's a literal. I still think either documentation or implementation needs to be fixed here. -- resolution: not a bug -> status: closed -> open title: Ellipsis token.type != token.ELLIPSIS -> Ellipsis_token.type != token.ELLIPSIS type: behavior -> ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31394> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31394] Ellipsis token.type != token.ELLIPSIS
Aivar Annamaa added the comment: But it looks like Ellipsis is neither operator nor delimiter: https://docs.python.org/3/reference/lexical_analysis.html#operators -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31394> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31394] Ellipsis token.type != token.ELLIPSIS
New submission from Aivar Annamaa: Type code for ellipsis token doesn't match with the constant token.ELLIPSIS: --- import io import token import tokenize source = "..." tokens = list(tokenize.tokenize(io.BytesIO(source.encode('utf-8')).readline)) ellipsis = tokens[1] print(ellipsis) print(token.ELLIPSIS) - This code outputs following in Python 3.5 and 3.6: > TokenInfo(type=53 (OP), string='...', start=(1, 0), end=(1, 3), line='...') > 52 and following in Python 3.4 > TokenInfo(type=52 (OP), string='...', start=(1, 0), end=(1, 3), line='...') > 51 -- components: Interpreter Core messages: 301687 nosy: Aivar.Annamaa priority: normal severity: normal status: open title: Ellipsis token.type != token.ELLIPSIS versions: Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31394> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Thonny 2.1, Python IDE for beginners
I'm happy to announce Thonny 2.1.0, a Python IDE for beginners. Thonny's main features are comprehensive program animation capabilities. Highlights of this release: * A simple pip GUI (Tools => Manage packages) * Plug-in system now allows installing separately packaged plug-ins. * Built-in Python version has been upgraded to 3.6.1. * The Shell now accepts compound statements. * Many bugs have been fixed. See the homepage for download links: http://thonny.org/ best regards, Aivar Annamaa http://thonny.org;>Thonny 2.1.0 Python IDE for beginners (02-May-17) -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
[issue23551] IDLE to provide menu link to PIP gui.
Aivar Annamaa added the comment: In case this issue becomes active again, I'm listing my design implemented in Thonny IDE (http://thonny.org) -- see the attached png. If you decide same design is suitable for IDLE, then I'm happy to create a version of the dialog without Thonny dependencies. Here's the current source: https://bitbucket.org/plas/thonny/src/master/thonny/plugins/pip_gui.py?at=master=file-view-default -- nosy: +Aivar.Annamaa Added file: http://bugs.python.org/file46821/thonny_pip_gui.png ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23551> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28121] If module starts with comment or empty line then frame.f_code.co_firstlineno is inconsistent with inspect.findsource
Aivar Annamaa added the comment: Looks like I misinderstood inspect.findsource. I thought it is supposed to give only the code for argument object (eg. only def code when given a function), but looks like it is giving the whole file. Unfortunately inspect.findsource is not documented in https://docs.python.org/3/library/inspect.html and inspect.getsource can't be used as replacement, because it doesn't work with modules. -- stage: -> resolved status: open -> closed versions: +Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28121> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29359] Deprecate string concatenation without plus
Changes by Aivar Annamaa <aivar.anna...@gmail.com>: -- components: +Interpreter Core ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29359> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29359] Deprecate string concatenation without plus
New submission from Aivar Annamaa: How quickly will you notice the bug here: for sequence in ["Command", "MagicCommand", "Open", "Save", "SaveAs", "NewFile", "EditorTextCreated" "ShellCommand", "ShellInput", "ShowView", "HideView", "TextInsert", "TextDelete", ]: do_something(sequence) ? Given the title of the issue, its probably not so hard, but usually a list literal is not the first thing to suspect. Similar problem of missing comma may occur easily with multiline calls. If concatenation without plus was deprecated, these mistakes would be so easy to notice. -- messages: 286152 nosy: Aivar.Annamaa priority: normal severity: normal status: open title: Deprecate string concatenation without plus type: enhancement versions: Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29359> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Thonny 2.0 released (Python IDE for beginners)
Hi! Thonny is Python IDE for learning and teaching programming. It is developed in University of Tartu, Estonia. It has an easy to use debugger which shows clearly how Python executes your programs. Unlike most debuggers, it can even show the steps of evaluating an expression, visually explain references, function calls, exceptions etc. For more info and downloads see http://thonny.cs.ut.ee/ [1] best regards, Aivar Annamaa University of Tartu Institute of Computer Science http://thonny.cs.ut.ee;>Thonny 2.0 - Python IDE for beginners (01-Oct-16) Links: -- [1] http://thonny.cs.ut.ee/ -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
Thonny 2.0 released (Python IDE for beginners)
Hi! Thonny is Python IDE for learning and teaching programming. It is developed in University of Tartu, Estonia. It has an easy to use debugger which shows clearly how Python executes your programs. Unlike most debuggers, it can even show the steps of evaluating an expression, visually explain references, function calls, exceptions etc. For more info and downloads see http://thonny.cs.ut.ee/ [1] best regards, Aivar Annamaa University of Tartu Institute of Computer Science http://thonny.cs.ut.ee;>Thonny 2.0 - Python IDE for beginners (01-Oct-16) Links: -- [1] http://thonny.cs.ut.ee/ -- https://mail.python.org/mailman/listinfo/python-list
[issue28121] If module starts with comment or empty line then frame.f_code.co_firstlineno is inconsistent with inspect.findsource
Changes by Aivar Annamaa <aivar.anna...@gmail.com>: -- components: +Interpreter Core type: -> behavior versions: +Python 3.5 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28121> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28121] If module starts with comment or empty line then frame.f_code.co_firstlineno is inconsistent with inspect.findsource
New submission from Aivar Annamaa: Following program shows that frame.f_code.co_firstlineno ignores first line if it is a comment (or empty line), but inspect.getsource(frame.f_code) returns also the first line: # first line import inspect frame = inspect.currentframe() print(frame.f_code.co_firstlineno) print(inspect.findsource(frame.f_code)) -- messages: 276211 nosy: Aivar.Annamaa priority: normal severity: normal status: open title: If module starts with comment or empty line then frame.f_code.co_firstlineno is inconsistent with inspect.findsource ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28121> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23551] IDLE to provide menu link to PIP gui.
Changes by Aivar Annamaa <aivar.anna...@gmail.com>: -- nosy: -Aivar.Annamaa ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23551> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers
Aivar Annamaa added the comment: install_name_tool can specify relative paths (see eg. https://wincent.com/wiki/@executable_path,_@load_path_and_@rpath). Therefore you don't need it in users' systems. I've used it successfully for bundling Python 3.5 and Tk 8.6 with my IDE, see https://bitbucket.org/plas/thonny/src/master/packaging /mac/build_requirements_old.sh and https://bitbucket.org/plas/thonny/src/master/packaging/mac/update_links.sh -- nosy: +Aivar.Annamaa ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15663> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26409] Support latest Tcl/Tk on future versions of Mac installer
New submission from Aivar Annamaa: Currently Mac installer can create only Tk 8.5 compatible Tkinter, even if Tcl/Tk 8.6 is installed. Unofficial distributions doesn't seem to have problems with Tk 8.6 on Mac. I think official installer should be upgraded as well. Best option for users would be bundling Tcl/Tk 8.6 with installer, just like Windows installer does. -- components: Installation, Macintosh, Tkinter messages: 260677 nosy: Aivar.Annamaa, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Support latest Tcl/Tk on future versions of Mac installer type: enhancement versions: Python 3.5, Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26409> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23551] IDLE to provide menu link to PIP gui.
Aivar Annamaa added the comment: In case "Open system shell" happens someday, here's my take on this: https://bitbucket.org/plas/thonny/src/master/thonny/plugins/system_shell/ It's a plugin for my beginners' IDE Thonny (http://thonny.cs.ut.ee). It creates a menu item which opens system terminal with current interpreter's binary folder(s) prepended to the path. As there may be several Python commands on path (eg. python and python3 in /usr/bin) and short pip command may be on path only for another version, a script gets automatically executed in this new terminal, which detects and tells user the commands to use (see attached screenshot) -- Added file: http://bugs.python.org/file41437/SystemShellForPython35.png ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23551> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23551] IDLE to provide menu link to PIP gui.
Aivar Annamaa added the comment: I believe for beginners it's not difficult to enter "pip install package". The trouble is with opening the command prompt, knowing about PATH and different Python versions etc. Terry mentioned GUI development to be more expensive. What about providing a special command for IDLE shell, similar to IPython's magic commands: %pip install package -- nosy: +Aivar.Annamaa ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23551> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23551] IDLE to provide menu link to PIP gui.
Aivar Annamaa added the comment: Another (more general) alternative: provide a menu item "Open system shell for this Python version", which opens a terminal window with correct Scripts or bin folder in path. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23551> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse
Aivar Annamaa added the comment: Radek, the source corresponding to Attribute node does start at col 0 in your example -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21295> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse
Aivar Annamaa added the comment: ast.Attribute node actually means "the atribute of something", ie. the node includes this "something" as subnode. > How can I get the position of 'bar' in 'foo.bar'? I don't know a good way for this, because bar is not an AST node for Python. If Python AST nodes included the information about where a node ends in source, I would take the ending col of node.value (foo in your example), and added 2. In my own program (http://thonny.cs.ut.ee, it's a Python IDE for beginners) I'm using a really contrived algorithm for determining the end positions of nodes. See function mark_text_ranges here: https://bitbucket.org/plas/thonny/src/b8860704c99d47760ffacfaa335d2f8772721ba4/thonny/ast_utils.py?at=master=file-view-default I'm not happy with my solution, but I don't know any other ways. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21295> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse
Aivar Annamaa added the comment: Yes, I also need col_offset to work as advertised because of a real world use case: Thonny (http://thonny.cs.ut.ee/) is a visual Python debugger which highlights the (sub)expression about to be evaluated. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21295 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23002] Trackpad scrolling in tkinter doesn't work on some laptops
New submission from Aivar Annamaa: Here's a simple tkinter program, where text can be scrolled by mouse wheel, and by trackpads of some laptops (Macbook Pro, Dell Latitude E5430), but not by trackpads of some other laptops (Lenovo T420). from tkinter import Tk from tkinter import scrolledtext window = Tk() text = scrolledtext.ScrolledText(window) text.grid() window.mainloop() -- components: Tkinter messages: 232253 nosy: Aivar.Annamaa priority: normal severity: normal status: open title: Trackpad scrolling in tkinter doesn't work on some laptops versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23002 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23002] Trackpad scrolling in tkinter doesn't work on some laptops
Aivar Annamaa added the comment: Clarification: In general trackpad scrolling does work on my Lenovo (eg. in Windows Notepad), it just doesn't work in tkinter programs (including IDLE) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23002 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22616] Allow connecting AST nodes with corresponding source ranges
New submission from Aivar Annamaa: Currently lineno and col_offset attributes in AST nodes have confusing roles. According to documentation they indicate the starting position of node's source text but according to recent developments (#16795) they seem to indicate a position most suitable to use in error messages related to that node (rather narrow goal IMO). Another problem is that currently the AST nodes don't contain any information about the end position of corresponding source text. Therefore it's very difficult to relate nodes with source. One could want to do this for example in advanced graphical debuggers (https://bitbucket.org/plas/thonny) I propose adding new attributes to AST nodes which indicate the corresponding source range. If you want to keep nodes lightweight by default, then you could also introduce a flag in ast.parse for getting these attributes. The range could be given either in token indices or in character positions (or both). This probably needs more discussion. (I would vote against pointers to UTF-8 bytes, as is the case with col_offset currently.) -- components: Interpreter Core messages: 229124 nosy: Aivar.Annamaa priority: normal severity: normal status: open title: Allow connecting AST nodes with corresponding source ranges type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22616 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe
New submission from Aivar Annamaa: Seems that the statement 'sys.stderr.write(Exception in Tkinter callback\n)' in Tk.report_callback_exception fails when the program is run with pythonw.exe, and brings down the whole process. A simple sample is attached. -- files: demo.py messages: 226712 nosy: Aivar.Annamaa priority: normal severity: normal status: open title: Tk.report_callback_exception kills process when run with pythonw.exe Added file: http://bugs.python.org/file36594/demo.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22384 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe
Changes by Aivar Annamaa aivar.anna...@gmail.com: -- components: +Tkinter type: - crash versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22384 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse
Aivar Annamaa added the comment: Just found out that ast.Attribute in Python 3.4 has similar problem -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21295 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse
Aivar Annamaa added the comment: Regarding #16795, the documentation says The lineno is the line number of source text and the col_offset is the UTF-8 byte offset of the first token that generated the node, not that lineno and col_offset indicate a suitable position to mention in the error messages related to this node. IMO lineno and col_offset should stay as predictable means for finding the (beginning of) source text of the node. In error reporting code one could inspect the situation and compute locations suitable for this. Alternatively, these attributes could be left for purposes mentioned in #16795 and parser developers could introduce new attributes in ast nodes which indicate both start and end positions of corresponding source. (Hopefully this would resolve also #18374 and #16806) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21295 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse
New submission from Aivar Annamaa: Following program gives correct result in Python versions older than 3.4, but incorrect result in 3.4: -- import ast tree = ast.parse(sin(0.5)) first_stmt = tree.body[0] call = first_stmt.value print(col_offset of call expression:, call.col_offset) print(col_offset of func of the call:, call.func.col_offset) --- it should print: col_offset of call expression: 0 col_offset of func of the call: 0 but in 3.4 it prints: col_offset of call expression: 3 col_offset of func of the call: 0 -- components: Interpreter Core files: py34_ast_call_bug.py messages: 216777 nosy: Aivar.Annamaa priority: normal severity: normal status: open title: Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse versions: Python 3.4 Added file: http://bugs.python.org/file34962/py34_ast_call_bug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21295 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse
Aivar Annamaa added the comment: ... also, lineno is wrong for both Call and call's func, when func and arguments are on different lines: import ast tree = ast.parse((sin\n(0.5))) first_stmt = tree.body[0] call = first_stmt.value print(col_offset of call expression:, call.col_offset) print(col_offset of func of the call:, call.func.col_offset) print(lineno of call expression:, call.lineno) print(lineno of func of the call:, call.lineno) # lineno-s should be 1 for both call and func -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21295 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions
Changes by Aivar Annamaa aivar.anna...@gmail.com: -- nosy: +Aivar.Annamaa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16806 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19091] ast.parse gives wrong position for some Names when non-ascii characters occur before
New submission from Aivar Annamaa: ast.parse gives col_offset=4 for Name x when given program a + x vs. col_offset=5 for x when Name a is replaced with a-umlaut (I can't write that character here, because it seems that the issue system doesn't handle non-ascii characters either). See the attached Python shell transcript for explanation (it's in UTF-8). -- components: Interpreter Core files: bug.txt messages: 198406 nosy: Aivar.Annamaa priority: normal severity: normal status: open title: ast.parse gives wrong position for some Names when non-ascii characters occur before type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file31870/bug.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19091 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19091] ast.parse gives wrong position for some Names when non-ascii characters occur before
Aivar Annamaa added the comment: Serhiy, it's similar in that it has to do with encodings, but I think it's caused by different bug. I suspect it has something to do with the fact that tokenizer gives positions as offsets of characters and ast as offsets of UTF-8 bytes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19091 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19091] ast.parse gives wrong position for some Names when non-ascii characters occur before
Aivar Annamaa added the comment: I should explain more -- the string containing the program is read in correctly, the trouble occurs during parse. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19091 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19091] ast.parse gives wrong position for some Names when non-ascii characters occur before
Aivar Annamaa added the comment: ast [gives positions as] offsets of UTF-8 bytes Oops, I'm sorry, I realized only now that this is the explanation of this behaviour. So, after all it seems to be a feature (albeit very weird), not a bug. -- resolution: - invalid ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19091 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s
New submission from Aivar Annamaa: When parsing following program: 1+2-3 ast.parse gives col_offset=3 to outermost BinOp (as shown by the attached test script). Correct col_offset would be 0 for both BinOp-s -- components: Interpreter Core files: binop_bug.py messages: 192394 nosy: Aivar.Annamaa priority: normal severity: normal status: open title: ast.parse gives wrong position (col_offset) for some BinOp-s versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file30793/binop_bug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18374 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18370] ast.parse produces wrong lineno and col_offset for triple-quoted strings
Aivar Annamaa added the comment: Seems this issue is a duplicate of http://bugs.python.org/issue16806 -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18370] ast.parse produces -1 as col_offset for triple-quoted strings
New submission from Aivar Annamaa: AST nodes for triple-quoted strings have -1 in col_offset field, as presented in the attached file. -- components: Interpreter Core files: col_offset_bug.py messages: 192355 nosy: Aivar.Annamaa priority: normal severity: normal status: open title: ast.parse produces -1 as col_offset for triple-quoted strings type: behavior versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file30784/col_offset_bug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18370] ast.parse produces -1 as col_offset for triple-quoted strings
Aivar Annamaa added the comment: Didn't notice before: the lineno attribute is also wrong -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18370] ast.parse produces wrong lineno and col_offset for triple-quoted strings
Changes by Aivar Annamaa aivar.anna...@gmail.com: -- title: ast.parse produces -1 as col_offset for triple-quoted strings - ast.parse produces wrong lineno and col_offset for triple-quoted strings ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13262] IDLE opens partially hidden
New submission from Aivar Annamaa aivar.anna...@gmail.com: When IDLE opens in Windows 7, its bottom edge will be hidden behind taskbar. It should position itself so that it's fully visible. -- components: IDLE messages: 146354 nosy: Aivar.Annamaa priority: normal severity: normal status: open title: IDLE opens partially hidden type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13262 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Is it possible to create C-style main function in Python? (for teaching purposes)
Thanks for all the comments! It seems that the best way is still just to teach students self discipline. And hope that they (for now) believe some things (eg. dangers of global variables) without seeing. Aivar -- http://mail.python.org/mailman/listinfo/python-list
Is it possible to create C-style main function in Python? (for teaching purposes)
Hi! I'm looking for a trick or hidden feature to make Python 3 automatically call a main function but without programmers writing `if __name__ == __main__: ...` I found rejected PEP 299, but i thought that maybe there's something new already. Here's why I want such a thing: I'm teaching introductory programming course with Python. I've seen that global variables attract beginners like honey attracts bees and this makes teaching function parameters harder. When students learn functions, they usually write their function definitions and function applications in the same scope -- in top-level of the module (don't know the correct term for it). This has the downside, that any variable introduced in top-level is automatically visible in function definitions and I have hard time convincing students not to use those variables in functions directly. I've been thinking that it might be better for teaching if all program code would be in functions. This would make Hello World a bit more difficult, but would help teaching the real thing ie. functions. best regards, Aivar -- http://mail.python.org/mailman/listinfo/python-list
Problem with -3 switch
Hi I'm getting started with Python and in order to get good habits for Python 3, i'd like to run my Python 2.6.1 with Python 3 warning mode. When i run python -3 and execute statement print 4 then i expect to see a warning because i've understood that this statement is not valid in Python 3 however no warning appears. Have is misunderstood something? I'm running Python on Windows Vista. thanks in advance! Aivar -- http://mail.python.org/mailman/listinfo/python-list
Re: Problem with -3 switch
As was recently pointed out in a nearly identical thread, the -3 switch only points out problems that the 2to3 converter tool can't automatically fix. Changing print to print() on the other hand is easily fixed by 2to3. Cheers, Chris I see. So i gotta keep my own discipline with print() then :) thanks! A -- http://mail.python.org/mailman/listinfo/python-list