Re: Detect naming typos (AttributeError) in function names

2023-11-06 Thread George Fischhof via Python-list
e of typo), and if you compile the code: https://docs.python.org/3/library/py_compile.html it will generate syntax error if non-existent function is called. linters can perhaps warn you (never had typos, because I use PyCharm) need to check the linters' doc BR, George -- https://mail.python.org/mailman/listinfo/python-list

String to Float, without introducing errors

2022-12-18 Thread Paul St George
of or fully aware of what goes on under the bonnet.  >> On 17 Dec 2022, at 16:54:05 EST 2022, Thomas Passin wrote: On 12/17/2022 3:45 PM, Paul St George wrote: > Thanks to all! > It was the rounding rounding error that I needed to avoid (as Peter J. Holzer > suggested). The

String to Float, without introducing errors

2022-12-18 Thread Paul St George
of or fully aware of what goes on under the bonnet. Here is a picture: https://paulstgeorge.com/newton/cyclography.html Thanks, Paul >> On 17 Dec 2022, at 16:54:05 EST 2022, Thomas Passin wrote: On 12/17/2022 3:45 PM, Paul St George wrote: > Thanks to all! > It was the rounding ro

Re: String to Float, without introducing errors

2022-12-17 Thread Paul St George
+ (7 * 0.1) + (2 * 0.01) + (7 * 0.001) Now I do not need to! > On 17 Dec 2022, at 13:11, Alan Gauld wrote: > > On 17/12/2022 11:51, Paul St George wrote: >> I have a large/long array of numbers in an external file. The numbers look >> like this: >> >> -6455

String to Float, without introducing errors

2022-12-17 Thread Paul St George
I have a large/long array of numbers in an external file. The numbers look like this: -64550.727 -64511.489 -64393.637 -64196.763 -63920.2 -63563.037 -63124.156 -62602.254 -61995.895 -61303.548 -60523.651 -59654.66 ... When I bring the numbers into my code, they are Strings. To use the numbers

Re: Download Python 3.10.6 for windows

2022-08-31 Thread George Rwaga
of my old code based on such sources as Python for Finance by Yves Hilpisch, a book by the same title by Yuxing Yan, Python for Data Analysis by Wes McKinney, etc. Again, thanks. George -- On Tue, Aug 30, 2022 at 4:06 PM Eryk Sun wrote: > On 8/30/22, George Rwaga wrote: > > > >

Download Python 3.10.6 for windows

2022-08-30 Thread George Rwaga
asked to verify access to this directly. I went to properties, made what I thought were the relevant changes. But I keep getting asked to verify access. My R and RStudio are installed in C:\program files. How should I proceed? George -- -- https://mail.python.org/mailman/listinfo/python-list

Re: exec() an locals() puzzle

2022-07-21 Thread george trojan
it cannot add > any to cdef-locals. > 4) locals() may be a superset of cdef-locals (but entries in cdef-locals > which value is still undefined are not shown in locals()) > 5) due rule 4, exec() cannot add a variable to locals() if it is already > present in the in cdef-locals.

exec() an locals() puzzle

2022-07-20 Thread george trojan
') 7 print(y) File :1, in NameError: name 'y' is not defined1. Another thing: within the first exec(), the print order seems reversed. What is going on? BTW, I am using python 3.8.13. George -- https://mail.python.org/mailman/listinfo/python-list

Re: Popular Python Package 'ctx' Hijacked to Steal AWS Keys

2022-05-25 Thread George Fischhof
ownloadable. Compiled parts should be allowed only in source, and security checkers would check those too, and compile from source and publish package only after these checks executed and did not found any harmful thing. BR, George -- https://mail.python.org/mailman/listinfo/python-list

Testing an app protected by Okta authorization code with PKCE flow

2022-04-29 Thread George Fischhof
with Okta. We are using Okta's .net backend stuff and Angular widget BR, George -- https://mail.python.org/mailman/listinfo/python-list

Re: for convenience

2022-03-24 Thread Paul St George
older on my Mac called ‘Cameron’. Perhaps I now need an additional folder. Then I can ask my question about whether Python grows to be more like its programmers, or do programmers learn to think Pythonically? — Paul St George -- https://mail.python.org/mailman/listinfo/python-list

Re: for convenience

2022-03-22 Thread Paul St George
On 21/03/2022 17.47, Avi Gross wrote: > So, I ask Paul what other language than python he has used before, just out > of curiosity. The other language I have used (and often) is Processing. Before that, and a long time ago, Lingo. — Paul --

Re: for convenience

2022-03-22 Thread Paul St George
On 21/03/2022 18.02, Cameron Simpson wrote: > On 21Mar2022 22:12, Paul St George wrote: > >When I am writing code, I often do things like this: > > > >context = bpy.context # convenience > > > >then whenever I need bpy.context, I only need to write cont

Re: for convenience

2022-03-22 Thread Paul St George
On 21/03/2022 18.04, dn wrote: > On 22/03/2022 10.17, Chris Angelico wrote: > > On Tue, 22 Mar 2022 at 08:13, Paul St George > <https://mail.python.org/mailman/listinfo/python-list>> wrote: > >> > >> > >> When I am writing code, I often do t

Re: for convenience

2022-03-21 Thread Paul St George
text` attribute in the `bpy` module. > > On Mon, 2022-03-21 at 22:12 +0100, Paul St George wrote: >> >> When I am writing code, I often do things like this: >> >> context = bpy.context # convenience >> >> then whenever I need bpy.context, I only need to w

for convenience

2022-03-21 Thread Paul St George
George -- https://mail.python.org/mailman/listinfo/python-list

[issue46717] Raising exception multiple times leaks memory

2022-02-10 Thread George Gensure
New submission from George Gensure : Instantiating an exception and raising it multiple times causes 1 frame and 2 traceback objects to remain allocated for each raise. The attached example causes python to consume 8GB of ram after a few seconds of execution on Windows/Linux

[issue45904] Pasting the U00FF character into Python REPL misinterprets character

2021-11-26 Thread George King
George King added the comment: Edit: `chr(0xff)` -- ___ Python tracker <https://bugs.python.org/issue45904> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45904] Pasting the U00FF character into Python REPL misinterprets character

2021-11-26 Thread George King
New submission from George King : Using macOS 11.6 Terminal.app with Python 3.10.0 installed directly from python.org. I open the REPL. If I enter `char(0xff)` I get back 'ÿ' as expected (U00FF LATIN SMALL LETTER Y WITH DIAERESIS). However, If I copy this character with surrounding quotes

[issue45900] Type annotations needed for convenience functions in ipaddress module

2021-11-25 Thread William George
Change by William George : -- keywords: +patch pull_requests: +28015 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29778 ___ Python tracker <https://bugs.python.org/issu

[issue45900] Type annotations needed for convenience functions in ipaddress module

2021-11-25 Thread William George
New submission from William George : The convenience factory functions in the ipaddress module each return one of two types (IPv4Network vs IPv6Network, etc). Modern code wants to be friendly to either stack, and these functions are great at enabling that, but current implementation blocks

[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-10-27 Thread Damien George
Damien George added the comment: Thanks for confirming the bug. Sending non-None to a not-started generator could arguably be case (2), because that's exactly the semantics introduced by the commit that broke the test case :) Honestly I don't have a strong opinion on which way this goes

[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-10-20 Thread Damien George
Damien George added the comment: It looks like this change introduced a subtle, and maybe intended (?), behavioural change. Consider (from MicroPython's test suite): def f(): n = 0 while True: n = yield n + 1 print(n) g = f() try: g.send(1) except TypeError

Re: Making command-line args available to deeply-nested functions

2021-08-31 Thread George Fischhof
George Fischhof ezt írta (időpont: 2021. aug. 29., V, 21:27): > > > Loris Bennett ezt írta (időpont: 2021. aug. > 26., Cs, 16:02): > >> George Fischhof writes: >> >> [snip (79 lines)] >> >> >> > Hi, >> >> > >> >>

Re: Making command-line args available to deeply-nested functions

2021-08-29 Thread George Fischhof
Loris Bennett ezt írta (időpont: 2021. aug. 26., Cs, 16:02): > George Fischhof writes: > > [snip (79 lines)] > > >> > Hi, > >> > > >> > Also you can give a try to click and / or typer packages. > >> > Putting args into environment

Re: Making command-line args available to deeply-nested functions

2021-08-23 Thread George Fischhof
Loris Bennett ezt írta (időpont: 2021. aug. 23., H 19:26): > George Fischhof writes: > > > Loris Bennett ezt írta (időpont: 2021. aug. > > 20., P 17:54): > > > >> Julio Di Egidio writes: > >> > >> > On Friday, 20 August 2

Re: Making command-line args available to deeply-nested functions

2021-08-21 Thread George Fischhof
> Loris > > -- > This signature is currently under construction. > -- > https://mail.python.org/mailman/listinfo/python-list > > > > Hi, Also you can give a try to click and / or typer packages. Putting args into environment variables can be a solution too All of these depends on several things: personal preferences, colleagues / firm standards, the program, readability, variable accessibility (IDE support, auto completition) (env vars not supported by IDEs as they are not part of code) BR, George -- https://mail.python.org/mailman/listinfo/python-list

[issue44916] Undefined/random behaviour when importing two modules with the same name but different source files

2021-08-14 Thread George
New submission from George : Warning: There's a higher probability this is "expected" undefined behaviour or not even undefined and I'm just a moron. In addtion, I couldn't actually replicate it outside of the specific context it happened. But if it sounds plausible and it's

[issue44875] Update dis.findlinestarts documentaiton to reflect new usage of `co_lines` (PEP 626)

2021-08-09 Thread George King
George King added the comment: I should also mention that my reading was not exhaustive, so there may be other docs that need updating as well. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44875] Update dis.findlinestarts documentaiton to reflect new usage of `co_lines` (PEP 626)

2021-08-09 Thread George King
New submission from George King : `dis.findlinestarts()` has been changed to use the no `co_lines()` function. (Blame indicates commit 877df851c3e by Mark Shannon.) However the docs currently state that it uses the older `co_firstlineno` and `co_lnotab`: https://docs.python.org/3.10/library

[issue44671] Create a built-in yaml module

2021-07-21 Thread Jurj Andrei George
Jurj Andrei George added the comment: I would also like to have yaml in the stdlib. I reckon it would make sense to at least discuss yaml given that toml is on its way in the stdlib. By the time a toml parser gets added, yaml will be the only major data serialization language

Re: Definition of "property"

2021-06-02 Thread George Fischhof
n OOP point of view one can write that property is the python implementation of the OOP concepts: Encapsulation and Information hiding Some explanation for beginners on these paradigms: https://stackify.com/oop-concept-for-beginners-what-is-encapsulation/ BR, George -- https://mail.python.org/mailman/listinfo/python-list

[issue36384] [security] CVE-2021-29921: ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2021-05-25 Thread George-Cristian Bîrzan
George-Cristian Bîrzan added the comment: I think the only thing I'd improve would be to mention that this issue is the one that introduced the bug, otherwise it looks a bit weird. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36384] [security] CVE-2021-29921: ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2021-05-25 Thread George-Cristian Bîrzan
George-Cristian Bîrzan added the comment: The timeline there is wrong. This issue's creation time isn't the disclosure time, it's when the bug was introduced. The disclosure was on 30th of May, when I emailed secur...@python.org and Christian Heimes commented here and made https://github.com

[issue36384] ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2021-03-31 Thread George-Cristian Bîrzan
Change by George-Cristian Bîrzan : -- nosy: +gc2 ___ Python tracker <https://bugs.python.org/issue36384> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43523] Handling Ctrl+C when waiting on stdin on Windows via winrs

2021-03-16 Thread George Sovetov
New submission from George Sovetov : Ctrl+C alone has no effect, but Ctrl+Break works: ``` winrs -r:127.0.0.1:20465 -u:Administrator -p:qweasd123 python -c "import sys;sys.stdin.read(1)" ``` Although, if I press Ctrl+C, type zero or more symbols and then press Enter, Keyboar

[issue43161] Taking sum of massive list comprehension results in total system crash.

2021-02-07 Thread George
George added the comment: Thanks Christian for the solutions. I am guessing that since it is my entire machine that crashes, and python is not simply killed for requesting so much memory, that this is an operating system problem. Should I submit this as a bug to the kernel project

[issue43161] Taking sum of massive list comprehension results in total system crash.

2021-02-07 Thread George
New submission from George : I tried running the following command in the interpreter, and without fail it will completely crash my entire computer. Python 3.8.7 (default, Jan 20 2021, 00:00:00) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux Type "help", "copyright", &

Re: [Python-authors] Query

2021-01-11 Thread George Fischhof
d, or accepted, but there is. As I know this is the only one somewhat standardised exam now. Of course there are several institutes holding Python course and exam BR, George -- https://mail.python.org/mailman/listinfo/python-list

[issue42409] Interpreter exit blocks waiting for ThreadPoolExecutor.map

2020-11-19 Thread George Stefos
Change by George Stefos : -- nosy: +stefosgiwrgos ___ Python tracker <https://bugs.python.org/issue42409> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42409] Interpreter exit blocks waiting for ThreadPoolExecutor.map

2020-11-19 Thread George Sakkis
New submission from George Sakkis : ThreadPoolExecutor.map() prevents interpreter exit if there is a reference to the generator it returns. In the attached script: - `python threadpool_map.py run1` exits as soon as the exception is raised on the main thread. This is the desired behavior

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-08-23 Thread George Melikov
George Melikov added the comment: PR rebased and ready to review. -- ___ Python tracker <https://bugs.python.org/issue39640> ___ ___ Python-bugs-list mailin

Re: Managing plug-ins

2020-05-27 Thread George Fischhof
nd one, is to put files to a given place and import them in runtime, I created a pluggable info monitor which does this: in every cycles imports the given files as plugins. https://pypi.org/project/pluggable-info-monitor/ BR, George -- https://mail.python.org/mailman/listinfo/python-list

[issue27035] Cannot set exit code in atexit callback

2020-05-03 Thread George King
George King added the comment: I think we should change the documentation to expand the parenthetical " (unless SystemExit is raised)" to a complete explanation of that special case. -- ___ Python tracker <https://bugs.python.o

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-02-15 Thread George Melikov
George Melikov added the comment: I want to add that it's a usual practice: - https://github.com/libuv/libuv/pull/1580/files/bdd987a9b4347164e31e22d2d5ce06fbb5ebc859 - https://rev.ng/gitlab/revng/qemu/commit/6f1953c4c14566d3303709869fd26201828b3ccf

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-02-15 Thread George Melikov
George Melikov added the comment: If there is a way not to sync data - you should use neither fdatasync nor fsync. So IMHO if someone wants to sync data and want to use fdatasync - I see the only way on MacOS is to use fsync(). > Note also that this change will not help to run c

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-02-15 Thread George Melikov
Change by George Melikov : -- keywords: +patch pull_requests: +17893 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18516 ___ Python tracker <https://bugs.python.org/issu

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-02-15 Thread George Melikov
New submission from George Melikov : POSIX fdatasync() is similar to fsync() but it tries not to sync non-needed metadata. If POSIX OS doesn't have it - it's safe to use fsync() (If we need to sync data to disk - we have to use one of these functions). This change will help to run code

[issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS

2020-01-10 Thread George Hickman
George Hickman added the comment: I came across this today with the same timeout behaviour on macOS 10.14.6. After some digging I tracked it down to the Search Domains setting of my local network, this was set to "local", removing that immediately fixed the issue. -- nosy:

Re: What do you use for slides?

2019-11-16 Thread George Fischhof
bers.club | https://github.com/Abdur-rahmaanJ > > Mauritius > > -- > > https://mail.python.org/mailman/listinfo/python-list > > > -- > https://mail.python.org/mailman/listinfo/python-list Hi I use Google drive's slides, plus https://revealjs.com/ br, George -- https://mail.python.org/mailman/listinfo/python-list

[issue38596] simple example give a Linux core dumped with atk-bridge

2019-10-26 Thread Feștilă George Cătălin
Feștilă George Cătălin added the comment: No. I don't have a reproducer script for this issue with Linux OS. The mytext is a class from another script named my_notepad. The problem comes with time when I use the menu to change the syntax value, as you can see: self.syntax = mytext

[issue38596] simple example give a Linux core dumped with atk-bridge

2019-10-26 Thread Feștilă George Cătălin
New submission from Feștilă George Cătălin : My simple notepad code with QtWidgets.QPlainTextEdit() give me a crash dump on Linux Fedora 30 with python3 Python 3.7.4 (default, Jul 9 2019, 16:32:37) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] on linux [mythcat@desk pyqt5_examples]$ uname -a Linux

Re: Newbie question about Python syntax

2019-08-26 Thread Paul St George
On 25/08/2019 02:39, Cameron Simpson wrote: On 24Aug2019 21:52, Paul St George wrote: [snip]> Aside from "map" being a poor name (it is also a builtin Python function), it seems that one creates one of these to control how some rendering process is done. The class refer

Re: Newbie question about Python syntax

2019-08-24 Thread Paul St George
On 24/08/2019 01:23, Cameron Simpson wrote: On 23Aug2019 13:49, Paul St George wrote: Context: I am using Python to interrogate the value of some thing in Blender (just as someone else might want to use Python to look at an email in a Mail program or an image in Photoshop). Assumptions: So

[issue37461] email.parser.Parser hang

2019-08-23 Thread George Zhang
Change by George Zhang : -- pull_requests: +15137 pull_request: https://github.com/python/cpython/pull/15432 ___ Python tracker <https://bugs.python.org/issue37

[issue37461] email.parser.Parser hang

2019-08-23 Thread George Zhang
Change by George Zhang : -- pull_requests: +15136 pull_request: https://github.com/python/cpython/pull/15430 ___ Python tracker <https://bugs.python.org/issue37

Re: Newbie question about Python syntax

2019-08-23 Thread Paul St George
On 22/08/2019 23:21, Kyle Stanley wrote: [snip] The tutorial that Terry was referring to was the one on docs.python.org, here's a couple of links for the sections he was referring to: Full section on classes: https://docs.python.org/3/tutorial/classes.html Section on instantiating objects

Re: Newbie question about Python syntax

2019-08-22 Thread Paul St George
On 22/08/2019 20:02, Terry Reedy wrote: On 8/22/2019 3:34 AM, Paul St George wrote: I have the Python API for the Map Value Node here: <https://docs.blender.org/api/current/bpy.types.CompositorNodeMapValue.html>. All well and good. Now I just want to write a simple line o

[issue37902] Add scrolling for IDLE browsers

2019-08-22 Thread George Zhang
George Zhang added the comment: Also, how should I get the new code coverage percentage (or should it be ignored for now)? I'm thinking of adding a few more tests that send invalid events which would raise KeyError but I don't think that this behaviour will be used (and it's

[issue37902] Add scrolling for IDLE browsers

2019-08-22 Thread George Zhang
George Zhang added the comment: I renamed mousescroll to handlescroll as it's an independent callback function and I think it fits its use case better. I can keep it as mousescroll if you like though. The handlescroll function is now a standalone module function in tree.py

Re: Newbie question about Python syntax

2019-08-22 Thread Paul St George
On 22/08/2019 11:49, Cameron Simpson wrote: On 22Aug2019 09:34, Paul St George wrote: I have the Python API for the Map Value Node here: <https://docs.blender.org/api/current/bpy.types.CompositorNodeMapValue.html>. All well and good. Now I just want to write a simple line o

Newbie question about Python syntax

2019-08-22 Thread Paul St George
I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as: import bpy ... >>>print(bpy.types.CompositorNodeMapValue.max[0]) If this works, I will

[issue37902] Add scrolling for IDLE browsers

2019-08-21 Thread George Zhang
George Zhang added the comment: Looks like my PRs are getting out of hand... This is the final PR :P -- ___ Python tracker <https://bugs.python.org/issue37

[issue37902] Add scrolling for IDLE browsers

2019-08-21 Thread George Zhang
Change by George Zhang : -- pull_requests: +15079 pull_request: https://github.com/python/cpython/pull/15368 ___ Python tracker <https://bugs.python.org/issue37

[issue37902] Add scrolling for IDLE browsers

2019-08-21 Thread George Zhang
Change by George Zhang : -- pull_requests: -15077 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37902] Add scrolling for IDLE browsers

2019-08-21 Thread George Zhang
Change by George Zhang : -- pull_requests: -15076 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37902] Add scrolling for IDLE browsers

2019-08-21 Thread George Zhang
Change by George Zhang : -- pull_requests: +15076 pull_request: https://github.com/python/cpython/pull/15360 ___ Python tracker <https://bugs.python.org/issue37

[issue37902] Add scrolling for IDLE browsers

2019-08-21 Thread George Zhang
Change by George Zhang : -- pull_requests: +15076, 15077 pull_request: https://github.com/python/cpython/pull/15360 ___ Python tracker <https://bugs.python.org/issue37

[issue37902] Add scrolling for IDLE browsers

2019-08-21 Thread George Zhang
Change by George Zhang : -- pull_requests: -15072 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37902] Add scrolling for IDLE browsers

2019-08-21 Thread George Zhang
George Zhang added the comment: I looked at the code for scrolling and moved it over to the ScrolledCanvas and TreeNode (because it uses a Label that sits on the canvas, meaning we have to rebind it here). I haven't figured out how to add the scroll-by-pressing-down-and-moving way but I'll

[issue37902] Add scrolling for IDLE browsers

2019-08-21 Thread George Zhang
Change by George Zhang : -- keywords: +patch pull_requests: +15072 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15360 ___ Python tracker <https://bugs.python.org/issu

Re: absolute path to a file

2019-08-21 Thread Paul St George
On 21/08/2019 04:09, Grant Edwards wrote: On 2019-08-21, Richard Damon wrote: I think gmane feed the newsgroup comp.lang.python which feeds python-list@python.org. No, gmane is a gateway to python-list@python.org. -- Grant I use https://mail.python.org/pipermail/python-list/ to confirm

[issue37902] Add scrolling for IDLE browsers

2019-08-20 Thread George Zhang
New submission from George Zhang : I've just started using IDLE's module/path browsers and they offer a lot! Putting aside the issue of them opening in separate windows, they have a small change that could be made to improve them. Both browsers have scrollbars, but (for me at least) I cannot

Re: absolute path to a file

2019-08-20 Thread Paul St George
On 20/08/2019 11:43, Cameron Simpson wrote: Please remember to CC the list. Instead of 'Post a followup to this newsgroup' or 'To: python-list@python.org'? On 19Aug2019 22:06, Paul St George wrote: On 19/08/2019 14:16, Cameron Simpson wrote: [...] There's a remark on that web page I

Re: absolute path to a file

2019-08-19 Thread Paul St George
On 19/08/2019 14:16, Cameron Simpson wrote: On 19Aug2019 08:52, Paul St George wrote: On 19/08/2019 01:31, Cameron Simpson wrote: On 18Aug2019 17:29, Paul St George wrote: On 18/08/2019 02:03, Cameron Simpson wrote: 1: Is image01.tif a real existing file when you ran this code? Yes. image01

Re: absolute path to a file

2019-08-19 Thread Paul St George
On 19/08/2019 01:31, Cameron Simpson wrote: Paul, I can see we must train you in the interleaved response style :-) On 18Aug2019 17:29, Paul St George wrote: On 18/08/2019 02:03, Cameron Simpson wrote: 1: Is image01.tif a real existing file when you ran this code? Yes. image01.tif is real

[issue37882] Code folding in IDLE

2019-08-18 Thread George Zhang
Change by George Zhang : -- type: -> enhancement ___ Python tracker <https://bugs.python.org/issue37882> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue37882] Code folding in IDLE

2019-08-18 Thread George Zhang
New submission from George Zhang : Congrats on adding line numbers to IDLE. With this change, a change to add code folding could be done more easily as the folding can reference the line numbers. Many other IDEs have code folding but IDLE should also have it. Code folding could be done

Re: absolute path to a file

2019-08-18 Thread Paul St George
On 18/08/2019 02:03, Cameron Simpson wrote: On 17Aug2019 11:51, Paul St George wrote: print('Track D  from Track B:',os.path.realpath(n.image.filepath)) ---Track D  from Track B: /image01.tif print('Track E  from Track B:',os.path.realpath(n.image.filepath[1:])) ---Track E  from Track B

Re: absolute path to a file

2019-08-17 Thread Paul St George
On 17/08/2019 15:37, Peter Otten wrote: Paul St George wrote: Can someone please tell me how to get the absolute path to a file? I have tried os.path.abspath. In the code below I have a problem in the final line (15). # |import bpy|| Is this blender? If so the "//" prefix sta

Re: absolute path to a file

2019-08-17 Thread Paul St George
On 17/08/2019 16:32, Dennis Lee Bieber wrote: On Sat, 17 Aug 2019 11:51:47 +0200, Paul St George declaimed the following: print('Track E from Track B:',os.path.realpath(n.image.filepath[1:])) ---Track E from Track B: /image01.tif Just for giggles, what happens if you preface

Re: absolute path to a file

2019-08-17 Thread Paul St George
On 17/08/2019 15:37, Peter Otten wrote: Paul St George wrote: Can someone please tell me how to get the absolute path to a file? I have tried os.path.abspath. In the code below I have a problem in the final line (15). # |import bpy|| Is this blender? If so the "//" prefix sta

Re: absolute path to a file

2019-08-17 Thread Paul St George
On 17/08/2019 01:07, Gregory Ewing wrote: On Sat, Aug 17, 2019 at 2:27 AM Paul St George wrote: BUT does not work with | print('test2:',os.path.realpath(n.image.filepath))| This returns only |/image01.tif| What does n.image.filepath look like on its own? If it starts with a leading slash

Re: absolute path to a file

2019-08-16 Thread Paul St George
On 16/08/2019 18:37, Chris Angelico wrote: On Sat, Aug 17, 2019 at 2:27 AM Paul St George wrote: BUT does not work with | print('test2:',os.path.realpath(n.image.filepath))| This returns only |/image01.tif| Notes: Chris, I only mention the extra leading slash on my Mac in case anyone

Re: Re: absolute path to a file

2019-08-16 Thread Paul St George
ggestion which seems to be better for the situation where I used resolve() before. -- Paul St George http://www.paulstgeorge.com http://www.devices-of-wonder.com +44(0)7595 37 1302 -- https://mail.python.org/mailman/listinfo/python-list

absolute path to a file

2019-08-15 Thread Paul St George
es/image02.tif which is at //images/image02.tif But I want an absolute path such as: ---Plane uses image01.tif saved at /Users/Lion/Desktop/test8/image01.tif ---Plane uses image02.tif saved at /Users/Lion/Desktop/images/image02.tif If it is relevant, my files are on a Mac. Hence the escaped forward slash. --

Re: How to plot a data including date and time?

2019-08-14 Thread George Fischhof
gt; > > plt.ioff() > > > > df.plot(x='Date') > > > > print(df.tail(60)) #a debug line I left in to watch the EWMs sink to more > > healthy levels > > > > plt.ylabel('mm Hg') > > > > plt.suptitle("Home BP record") > > > > plt.show() > > > > That should give you a start > > -- > To de-mung my e-mail address:- fsnospam$elliott$$ PGP Fingerprint: 1A96 > 3CF7 > 637F 896B C810 E199 7E5C A9E4 8E59 E248 > > -- > https://mail.python.org/mailman/listinfo/python-list Hi, Pygal is a very good and easy to use charting library BR, George > -- https://mail.python.org/mailman/listinfo/python-list

Re: Re: String slices

2019-08-10 Thread Paul St George
On 10/08/2019 17:35, Dennis Lee Bieber wrote: On Sat, 10 Aug 2019 11:45:43 +0200, "Peter J. Holzer" declaimed the following: There are of course many variants to all three methods. And then one can get downright nasty... X = 3.14 Y = 2.78 Z = 6.226E23 print("".join(["Plane

Re: Re: String slices

2019-08-09 Thread Paul St George
On 09/08/2019 16:29, Rhodri James wrote: On 09/08/2019 15:13, Paul St George wrote: In the code (below) I want a new line like this: Plane rotation X: 0.0 Plane rotation Y: 0.0 Plane rotation Z: 0.0 But not like this: Plane rotation X: 0.0 Plane rotation Y: 0.0 Plane rotation Z: 0.0

Re: Re: Python in Blender. Writing information to a file.

2019-08-09 Thread Paul St George
On 09/08/2019 15:59, Rhodri James wrote: On 09/08/2019 14:54, Paul St George wrote: On 09/08/2019 04:09, Cameron Simpson wrote: On 08Aug2019 22:42, Paul St George wrote: On 08/08/2019 10:18, Peter Otten wrote: The print() function has a keyword-only file argument. So: with open(..., &q

String slices

2019-08-09 Thread Paul St George
In the code (below) I want a new line like this: Plane rotation X: 0.0 Plane rotation Y: 0.0 Plane rotation Z: 0.0 But not like this: Plane rotation X: 0.0 Plane rotation Y: 0.0 Plane rotation Z: 0.0 Is it possible? (I am using Python 3.5 within Blender.) # import os outstream =

Re: Python in Blender. Writing information to a file.

2019-08-09 Thread Paul St George
On 09/08/2019 04:09, Cameron Simpson wrote: On 08Aug2019 22:42, Paul St George wrote: On 08/08/2019 10:18, Peter Otten wrote: The print() function has a keyword-only file argument. So: with open(..., "w") as outstream:     print("Focal length:", bpy.context.object.data.l

[issue32810] Expose ags_gen and agt_gen in asynchronous generators

2019-08-08 Thread George Zhang
George Zhang added the comment: Also, while the PEP first introducing asynchronous generators stated that its .asend() and .athrow() methods will return a "coroutine-like object", it doesn't allow any introspection into its state or parent async generator. My workaround w

Re: Re: Python in Blender. Writing information to a file.

2019-08-08 Thread Paul St George
On 08/08/2019 10:18, Peter Otten wrote: Paul St George wrote: I am using Python 3.5 within Blender. I want to collect values of the current settings and then write all the results to a file. I can see the settings and the values in the Python console by doing this for each of the settings

Python in Blender. Writing information to a file.

2019-08-08 Thread Paul St George
I am using Python 3.5 within Blender. I want to collect values of the current settings and then write all the results to a file. I can see the settings and the values in the Python console by doing this for each of the settings | | |print(“Focal length:”,bpy.context.object.data.lens)|

[issue37771] No equivalent of `inspect.getcoroutinestate` for PyAsyncGenASend instances

2019-08-06 Thread George Zhang
Change by George Zhang : -- versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue37771> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37391] MacOS Touchpad scrolling crashes IDLE

2019-06-25 Thread George Pantazes
George Pantazes added the comment: In case anyone would like to weigh in on the Homebrew side, I've filed the homebrew issue here: https://github.com/Homebrew/homebrew-core/issues/41338 . -- ___ Python tracker <https://bugs.python.org/issue37

[issue37391] MacOS Touchpad scrolling crashes IDLE

2019-06-25 Thread George Pantazes
George Pantazes added the comment: Checked against the python.org installation. In that installation's IDLE, About IDLE > Tk version 8.6.8. So my question is: - Is it on me to fix this for my own machine because I should have gotten my own more-up-to-date TK before installing Python

[issue37391] MacOS Touchpad scrolling crashes IDLE

2019-06-25 Thread George Pantazes
George Pantazes added the comment: Alright folks, sorry there's going to be a lot of pasted blocks of output, so just look for where I @ your name to address your questions. @ned.deily, here is the output of those info commands. ``` ➜ python3 -m test.pythoninfo

  1   2   3   4   5   6   7   8   9   10   >