[RELEASE] Python 3.13.0 beta 4 released.

2024-07-18 Thread Thomas Wouters via Python-list
Python 3.13.0b4, the final beta of Python 3.13, is now available: https://www.python.org/downloads/release/python-3130b4/ *This is a beta preview of Python 3.13* Python 3.13 is still in development. This release, 3.13.0b4, is the *final* beta release preview of 3.13. Beta release previews

RE: Relatively prime integers in NumPy

2024-07-12 Thread AVI GROSS via Python-list
this for you, like expand.grd. Python has many modules, like itertools that do things including combinations but perhaps not designed for your case. Here is a version of your scenario: import itertools a = range(3) b = range(4) c = range(5) list(itertools.product(a,b,c)) The result

Re: Relatively prime integers in NumPy

2024-07-12 Thread Popov, Dmitry Yu via Python-list
Thank you very much. List comprehensions make code much more concise indeed. Do list comprehensions also improve the speed of calculations? From: avi.e.gr...@gmail.com Sent: Friday, July 12, 2024 6:57 PM To: Popov, Dmitry Yu ; 'Popov, Dmitry Yu via Python-list

RE: Relatively prime integers in NumPy

2024-07-12 Thread AVI GROSS via Python-list
some have) or you explain well enough. I am guessing you have programming experience in other languages and are not as “pythonic” as some. The code you show may not be quite how others might do it. Some may write mch of your code as a single line of python using a list comprehension

Re: Relatively prime integers in NumPy

2024-07-12 Thread Popov, Dmitry Yu via Python-list
Thank you very much, Oscar. Using the following code looks like a much better solution than my current Python code indeed. np.gcd.reduce(np.transpose(a)) or np.gcd.reduce(a,1) The next question is how I can generate ndarray of h,k,l indices. This can be easily done from a Python list by using

Re: Password Hash Validation (Posting On Python-List Prohibited)

2024-07-12 Thread Lawrence D'Oliveiro via Python-list
s the various functions of the module. -- https://mail.python.org/mailman/listinfo/python-list

Re: Relatively prime integers in NumPy

2024-07-12 Thread Popov, Dmitry Yu via Python-list
Thank you for your interest. My explanation is too concise indeed, sorry. So far, I have used Python code with three enclosed 'for' loops for this purpose which is pretty time consuming. I'm trying to develop a NumPy based code to make this procedure faster. This routine is kind of 'heart

Re: Best use of "open" context manager

2024-07-12 Thread Albert-Jan Roskam via Python-list
-- https://mail.python.org/mailman/listinfo/python-list

Re: Relatively prime integers in NumPy

2024-07-12 Thread Peter J. Holzer via Python-list
On 2024-07-08 19:09:45 +, Popov, Dmitry Yu via Python-list wrote: > Does NumPy provide a simple mechanism to identify relatively prime > integers, i.e. integers which don't have a common factor other than +1 > or -1? Typing "numpy gcd" into my favourite search engine

RE: Relatively prime integers in NumPy

2024-07-11 Thread AVI GROSS via Python-list
, 2024 3:26 PM To: avi.e.gr...@gmail.com; 'Popov, Dmitry Yu via Python-list' Subject: Re: Relatively prime integers in NumPy Thank you for your interest. My explanation is too concise indeed, sorry. So far, I have used Python code with three enclosed 'for' loops for this purpose which

Re: Relatively prime integers in NumPy

2024-07-11 Thread Oscar Benjamin via Python-list
(posting on-list this time) On Thu, 11 Jul 2024 at 15:18, Popov, Dmitry Yu via Python-list wrote: > > Dear Sirs. > > Does NumPy provide a simple mechanism to identify relatively prime integers, > i.e. integers which don't have a common factor other than +1 or -1? For >

RE: Relatively prime integers in NumPy

2024-07-11 Thread AVI GROSS via Python-list
on top of numpy. Is there a reason you cannot solve this mostly outside numpy? It looks like you could use numpy to select the numbers you want to compare, then call one of many methods you can easily search for to see how to use python to make some list or other data structure for divisors of each

Re: python repl vi mode line editing not working.

2024-07-11 Thread Tobiah via Python-list
I see the literal 'escape' character + 'k', when it should let me edit previous commands. I did have to compile my own python because I'm using 2.7 on this machine. I figured it out. I needed to apt install libreadline-dev. -- https://mail.python.org/mailman/listinfo/python-list

Re: python repl vi mode line editing not working.

2024-07-11 Thread Tobiah via Python-list
For this to work, the Python implementation should use the same readline library as your shell, I guess. It works in python3, so I guess my problem is that I'm compiling python (I think kubuntu dropped python2), but I don't see any relevant options in the configure help. -- https

Problem using mysql library

2024-07-11 Thread Tobiah via Python-list
sinewave:toby ~(1)> python Python 2.7.18 (default, Jul 8 2024, 12:49:12) [GCC 13.2.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. import MySQLdb Traceback (most recent call last): File "", line 1, in

python repl vi mode line editing not working.

2024-07-11 Thread Tobiah via Python-list
Kubuntu 24.04. sinewave:toby ~(1)> cat .inputrc set editing-mode vi set keymap vi sinewave:toby ~(1)> cat .editrc bind -v bind \\t rl_complete sinewave:toby ~(1)> python Python 2.7.18 (default, Jul 8 2024, 12:49:12) [GCC 13.2.0] on linux2 Type "help", "copyright

Relatively prime integers in NumPy

2024-07-11 Thread Popov, Dmitry Yu via Python-list
along axis 0: [1,2,3]. Those triples of numbers along axis 1 with the factor of1 or -1 would be relatively prime integers. Regards, Dmitry Popov Argonne, IL USA -- https://mail.python.org/mailman/listinfo/python-list

Re: Best (simplest) way to share data

2024-07-11 Thread Chris Green via Python-list
mething (here: printing an incrementing value > named "info") and also serving requests from other processes > for this "info" value: > [snip] Thanks, that should get me started! :-) -- Chris Green · -- https://mail.python.org/mailman/listinfo/python-list

Re: A new feature request - parser add_mutually_exclusive_group - add a default value

2024-07-09 Thread אורי via Python-list
Thank you. Uri. אורי u...@speedy.net On Tue, Jul 9, 2024 at 6:40 PM Barry Scott wrote: > > > On 9 Jul 2024, at 06:13, ⁨אורי via Python-list⁩ <⁨python-list@python.org⁩> > wrote: > > I tried to subscribe to Python-ideas > > > These days ideas are discus

Re: A new feature request - parser add_mutually_exclusive_group - add a default value

2024-07-09 Thread Barry Scott via Python-list
> On 9 Jul 2024, at 06:13, ⁨אורי via Python-list⁩ <⁨python-list@python.org⁩> > wrote: > > I tried to subscribe to Python-ideas These days ideas are discussed on https://discuss.python.org/ It is rare to see an idea on the mailing list. Barry -- https://mail.python.or

A new feature request - parser add_mutually_exclusive_group - add a default value

2024-07-08 Thread אורי via Python-list
test-default-languages=True to be set as a default. 2. I tried to subscribe to Python-ideas python-id...@python.org, but I can't login to https://mail.python.org/mailman3/lists/python-ideas.python.org/. Although I did login to https://mail.python.org/mailman/options/python-list . Do I have

Re: Best use of "open" context manager

2024-07-08 Thread Rob Cliffe via Python-list
On 06/07/2024 12:57, Oscar Benjamin via Python-list wrote: On Sat, 6 Jul 2024 at 11:55, Rob Cliffe via Python-list wrote: Consider this scenario (which I ran into in real life): I want to open a text file and do a lot of processing on the lines of that file. If the file does

Re: python for irc client

2024-07-08 Thread orzodk via Python-list
Daniel via Python-list writes: > One thing missing is a good textmode irc client that will connect to > quassel core. > > I've seen efforts to make a plugin for weechat but, to date, I don't see much > progress on that end. > > In your wisdom, would python be a good envi

Re: Best (simplest) way to share data (Posting On Python-List Prohibited)

2024-07-08 Thread Chris Green via Python-list
s that would be kept up to date by one process and asked for by all the others. -- Chris Green · -- https://mail.python.org/mailman/listinfo/python-list

Re: Best (simplest) way to share data between processes

2024-07-08 Thread Chris Green via Python-list
is is even simpler than using a file. > Yes, but it's conceptually (and programming wise) much simpler to have separate scripts. Some of them are simple 'on demand' scripts that I run from the command line when I want to know something. Others are scripts that drive displays on control panels. -- Chris Green · -- https://mail.python.org/mailman/listinfo/python-list

Re: Best (simplest) way to share data between processes

2024-07-08 Thread Left Right via Python-list
. On Sun, Jul 7, 2024 at 11:12 PM Chris Green via Python-list wrote: > > I have a Raspberry Pi in my boat that uses I2C to read a number of > voltages and currents (using ADS1115 A2D) so I can monitor the battery > condition etc. > > At present various different scripts (i.e. pr

Re: PyGILState_Ensure() deadlocks, why?

2024-07-08 Thread Barry Scott via Python-list
> On 7 Jul 2024, at 23:21, Barry via Python-list wrote: > > > >> On 7 Jul 2024, at 22:09, Tomas Ukkonen via Python-list >> wrote: >> >>Py_Initialize(); > > You also need to tell python to init threading. I'm in front of my de

Re: Best (simplest) way to share data between processes

2024-07-08 Thread Barry Scott via Python-list
> On 7 Jul 2024, at 23:47, MRAB via Python-list wrote: > > For clarity I'd recommend os.replace instead. This is because on Windows > os.rename it would complain if the target file already exists, but os.replace > has the same behaviour on both Linux and Windows. Agreed

Re: Best use of "open" context manager

2024-07-07 Thread Cameron Simpson via Python-list
-- https://mail.python.org/mailman/listinfo/python-list

Re: Best use of "open" context manager

2024-07-07 Thread Cameron Simpson via Python-list
re line: some lines of text -- https://mail.python.org/mailman/listinfo/python-list

Re: Best (simplest) way to share data between processes

2024-07-07 Thread MRAB via Python-list
On 2024-07-07 23:27, Barry via Python-list wrote: On 7 Jul 2024, at 22:13, Chris Green via Python-list wrote: a simple file lock can then be used to prevent simultaneous access (well, simultaneous access when the writing process is writing). There is a simple pattern to make this robust

Re: Best (simplest) way to share data between processes

2024-07-07 Thread Barry via Python-list
> On 7 Jul 2024, at 22:13, Chris Green via Python-list > wrote: > > a simple file lock can then > be used to prevent simultaneous access (well, simultaneous access when > the writing process is writing). There is a simple pattern to make this robust. Write new values to

Re: Best use of "open" context manager

2024-07-07 Thread Rob Cliffe via Python-list
(trying to access the file after "with f" raises the same     ValueError: I/O operation on closed file. I'm using Python 3.11.5. Best wishes Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Best (simplest) way to share data between processes

2024-07-07 Thread Gordinator via Python-list
/mailman/listinfo/python-list

Re: Best (simplest) way to share data between processes

2024-07-07 Thread Piergiorgio Sartor via Python-list
python.org/mailman/listinfo/python-list

Best (simplest) way to share data between processes

2024-07-07 Thread Chris Green via Python-list
/listinfo/python-list

Re: Best use of "open" context manager

2024-07-06 Thread Cameron Simpson via Python-list
pen()` call returns a file object _which can be used as a context manager_. It is separate from the `with` itself. -- https://mail.python.org/mailman/listinfo/python-list

Re: Best use of "open" context manager

2024-07-06 Thread dn via Python-list
On 6/07/24 22:49, Rob Cliffe via Python-list wrote: Consider this scenario (which I ran into in real life):     I want to open a text file and do a lot of processing on the lines of that file.     If the file does not exist I want to take appropriate action, e.g. print an error message

Re: Best use of "open" context manager

2024-07-06 Thread Richard Damon via Python-list
   print(f"File {FileName} not found:")    sys.exit() Now the "process" function has been factored out and can be well documented as to what it is doing on each line, and this code can be documented as running process on each line of the file. On 7/6/24 6:49 AM, Rob Cliffe vi

Re: Best use of "open" context manager

2024-07-06 Thread Thomas Passin via Python-list
On 7/6/2024 6:49 AM, Rob Cliffe via Python-list wrote: Consider this scenario (which I ran into in real life):     I want to open a text file and do a lot of processing on the lines of that file.     If the file does not exist I want to take appropriate action, e.g. print an error message

Re: Best use of "open" context manager

2024-07-06 Thread Oscar Benjamin via Python-list
On Sat, 6 Jul 2024 at 11:55, Rob Cliffe via Python-list wrote: > > Consider this scenario (which I ran into in real life): > I want to open a text file and do a lot of processing on the lines > of that file. > If the file does not exist I want to take appropriate actio

Re: Best use of "open" context manager

2024-07-06 Thread Alan Gauld via Python-list
On 06/07/2024 11:49, Rob Cliffe via Python-list wrote: >     If the file does not exist I want to take appropriate action, e.g. > print an error message and abort the program. > I might write it like this: > > try: >     with open(FileName) as f: >         for ln in f:

Re: Best use of "open" context manager

2024-07-06 Thread Dan Sommers via Python-list
On 2024-07-06 at 11:49:06 +0100, Rob Cliffe via Python-list wrote: > Is there a better / more Pythonic solution? https://docs.python.org/3/library/fileinput.html At least this attempts to abstract the problem of iterating over a file (or multiple files) into a library routine. I've u

Best use of "open" context manager

2024-07-06 Thread Rob Cliffe via Python-list
modify the last attempt to open the file twice, which would work, but seems like a kludge (subject to race condition, inefficient). Is there a better / more Pythonic solution? Best wishes Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: python for irc client

2024-07-04 Thread Daniel via Python-list
inhahe writes: > On Thu, Jul 4, 2024 at 5:14 AM Daniel via Python-list < > python-list@python.org> wrote: > >> Hi guys - >> >> I have historical experience developing sofwtare for my own use. It has >> been >> quite a while since doing so and the a

Re: python for irc client

2024-07-04 Thread Left Right via Python-list
Hi. Just FYI, I use Erc (in Emacs). I'm not a very advanced user, perhaps, but I never felt like I miss anything. That's not to stop you from making your own, but if you just need a decent text client for IRC, then there's already at least one. On Thu, Jul 4, 2024 at 11:30 AM inhahe via Python

Re: python for irc client

2024-07-04 Thread inhahe via Python-list
On Thu, Jul 4, 2024 at 5:22 AM inhahe wrote: > > > On Thu, Jul 4, 2024 at 5:14 AM Daniel via Python-list < > python-list@python.org> wrote: > >> >> In your wisdom, would python be a good environment to accomplish this? > > > I think Python would

Re: python for irc client

2024-07-04 Thread inhahe via Python-list
On Thu, Jul 4, 2024 at 5:14 AM Daniel via Python-list < python-list@python.org> wrote: > Hi guys - > > I have historical experience developing sofwtare for my own use. It has > been > quite a while since doing so and the advent of new languages has brought me > here

python for irc client

2024-07-04 Thread Daniel via Python-list
Hi guys - I have historical experience developing sofwtare for my own use. It has been quite a while since doing so and the advent of new languages has brought me here. Python has built quite a reputation. It would be fun to pick up a new language while I'm at it. I've been a consumer of IRC

ANN: eGenix PyRun - One file Python Runtime 2.5.0

2024-07-01 Thread eGenix Team via Python-list
*ANNOUNCING* eGenix PyRun - One file Python Runtime Version 2.5.0 Python runtime taking up just 4-6MB on disk This announcement is also available on our web-site for online reading: https://www.egenix.com/company/news/eGenix-PyRun-2.5.0-GA.html

Re: Difference method vs attribut = function

2024-06-30 Thread Dieter Maurer via Python-list
sed in this way, it becomes (typically) a method. -- https://mail.python.org/mailman/listinfo/python-list

Re: Difference method vs attribut = function

2024-06-29 Thread Thomas Passin via Python-list
On 6/28/2024 12:08 PM, Ulrich Goebel via Python-list wrote: Hi, a class can have methods, and it can have attributes, which can hold a function. Both is well known, of course. My question: Is there any difference? The code snipped shows that both do what they should do. But __dict__ includes

Re: Difference method vs attribut = function

2024-06-29 Thread Mats Wichmann via Python-list
On 6/28/24 10:08, Ulrich Goebel via Python-list wrote: By the way: in my usecase I want to pass different functions to different instances of MyClass. It is in the context of a database app where I build Getters for database data and pass one Getter per instance. If I understood what you're

Re: Difference method vs attribut = function

2024-06-29 Thread Peter J. Holzer via Python-list
On 2024-06-28 18:08:54 +0200, Ulrich Goebel via Python-list wrote: > a class can have methods, and it can have attributes, which can hold a > function. Both is well known, of course. > > My question: Is there any difference? > > The code snipped shows that both do w

Difference method vs attribut = function

2024-06-29 Thread Ulrich Goebel via Python-list
instances of MyClass. It is in the context of a database app where I build Getters for database data and pass one Getter per instance. Thanks for hints Ulrich -- Ulrich Goebel -- https://mail.python.org/mailman/listinfo/python-list

[RELEASE] Python 3.13.0 beta 3 released.

2024-06-27 Thread Thomas Wouters via Python-list
The *next to last* Python 3.13 beta version, beta 3, is now released: https://www.python.org/downloads/release/python-3130b3/ *This is a beta preview of Python 3.13* Python 3.13 is still in development. This release, 3.13.0b3, is the third of four beta release previews of 3.13. Beta release

Re: [Tutor] How to install tensorflow on Python 2.7 in Windows?

2024-06-26 Thread Mats Wichmann via Python-list
On 6/26/24 09:29, marc nicole wrote: Browsing the available version of tensorflow for the dates before January 2021 (date when Python 2.7 stopped being supported) I can't find a tensorflow version for Python 2.7 that works under Windows. The reference site I use is https://pypi.org/project

How to install tensorflow on Python 2.7 in Windows?

2024-06-26 Thread marc nicole via Python-list
Browsing the available version of tensorflow for the dates before January 2021 (date when Python 2.7 stopped being supported) I can't find a tensorflow version for Python 2.7 that works under Windows. The reference site I use is https://pypi.org/project/tensorflow/ Anybody can point out

Re: Anonymous email users

2024-06-25 Thread Chris Angelico via Python-list
On Wed, 26 Jun 2024 at 03:40, Anton Shepelev via Python-list wrote: > > Chris Angelico to dn: > > > > Python mailing-lists are covered by the Code of Conduct > > > and monitored by ListAdmins. Thus, there are controls > > > which limit the impact which a

Re: Anonymous email users

2024-06-25 Thread Anton Shepelev via Python-list
Chris Angelico to dn: > > Python mailing-lists are covered by the Code of Conduct > > and monitored by ListAdmins. Thus, there are controls > > which limit the impact which advertisers and others with > > non-pythonic aims might otherwise exert! > > So long as ther

Re: Anonymous email users

2024-06-25 Thread Anton Shepelev via Python-list
- against proprietary attachments -- https://mail.python.org/mailman/listinfo/python-list

RE: Anonymous email users

2024-06-24 Thread AVI GROSS via Python-list
This discussion has wandered far from my original mention that I found it hard to reply to people using an invalid email address. I see no real connection to python except insofar as at least one spam-filter mentioned is written in python! Just to add an observation, the people writing here have

Re: Anonymous email users

2024-06-24 Thread Chris Angelico via Python-list
On Tue, 25 Jun 2024 at 11:41, Grant Edwards via Python-list wrote: > I've been using the same e-mail address for about 20 years. I've use > that e-mail address with probably close to 100 retailers, charities, > open-source projects, media sites, and various other organizations. Mostly

Re: Anonymous email users

2024-06-24 Thread Grant Edwards via Python-list
On 2024-06-24, Barry Scott via Python-list wrote: >> On 23 Jun 2024, at 06:58, Sebastian Wells via Python-list >> wrote: >> >> The spammers won the spam wars, so even if you have someone's real >> e-mail address, that's no guarantee that you can contact them. [...

Re: Anonymous email users

2024-06-24 Thread Chris Angelico via Python-list
On Tue, 25 Jun 2024 at 08:31, dn via Python-list wrote: > Python mailing-lists are covered by the Code of Conduct and monitored by > ListAdmins. Thus, there are controls which limit the impact which > advertisers and others with non-pythonic aims might otherwise exert! > So lon

Re: Anonymous email users

2024-06-24 Thread dn via Python-list
On 25/06/24 05:17, Thomas Passin via Python-list wrote: On 6/24/2024 5:51 AM, Barry Scott via Python-list wrote: On 23 Jun 2024, at 06:58, Sebastian Wells via Python-list wrote: The spammers won the spam wars, so even if you have someone's real e-mail address, that's no guarantee that you

RE: [Tutor] How to go about a simple object grabbing in python (given coordinates of arms and objects)

2024-06-24 Thread AVI GROSS via Python-list
Marc, Several people have supplied feedback on whether your request is a good fit for here. Ultimately it is up to the owner/moderator. In particular, your request to the Tutor List may not fit the purpose and be a bit complex and to the main Python List also outside some common usage whether

Re: Anonymous email users

2024-06-24 Thread Thomas Passin via Python-list
On 6/24/2024 5:51 AM, Barry Scott via Python-list wrote: On 23 Jun 2024, at 06:58, Sebastian Wells via Python-list wrote: The spammers won the spam wars, so even if you have someone's real e-mail address, that's no guarantee that you can contact them. You certainly wouldn't be able

Re: Anonymous email users

2024-06-24 Thread Barry Scott via Python-list
> On 23 Jun 2024, at 06:58, Sebastian Wells via Python-list > wrote: > > The spammers won the spam wars, so even if you have someone's real > e-mail address, that's no guarantee that you can contact them. You > certainly wouldn't be able to contact me at my real e-mail add

Tkinter and astral characters (was: Decoding bytes to text strings in Python 2)

2024-06-24 Thread Peter J. Holzer via Python-list
On 2024-06-24 01:14:22 +0100, MRAB via Python-list wrote: > Tkinter in recent versions of Python can handle astral characters, at least > back to Python 3.8, the oldest I have on my Windows PC. I just tried modifying https://docs.python.org/3/library/tkinter.html#a-hello-world-program to d

Re: [Tutor] How to go about a simple object grabbing in python (given coordinates of arms and objects)

2024-06-24 Thread marc nicole via Python-list
r from below all using both > > hands). > > > > Specifically, my problem is applied to a NAO robot environment where I > > retrieve a target object coordinates using the following code: > > This is almost entirely outside the Python domain and all within > your 3rd party e

Re: Decoding bytes to text strings in Python 2

2024-06-23 Thread Chris Angelico via Python-list
On Mon, 24 Jun 2024 at 10:18, MRAB via Python-list wrote: > Tkinter in recent versions of Python can handle astral characters, at > least back to Python 3.8, the oldest I have on my Windows PC. Good to know, thanks! I was hoping that would be the case, but I don't have a Windows system to

Re: Decoding bytes to text strings in Python 2

2024-06-23 Thread MRAB via Python-list
On 2024-06-24 00:30, Chris Angelico via Python-list wrote: On Mon, 24 Jun 2024 at 08:20, Rayner Lucas via Python-list wrote: In article , ros...@gmail.com says... > > If you switch to a Linux system, it should work correctly, and you'll > be able to migrate the rest of the way onto

Re: Decoding bytes to text strings in Python 2

2024-06-23 Thread Chris Angelico via Python-list
On Mon, 24 Jun 2024 at 08:20, Rayner Lucas via Python-list wrote: > > In article , > ros...@gmail.com says... > > > > If you switch to a Linux system, it should work correctly, and you'll > > be able to migrate the rest of the way onto Python 3. Once you achie

Re: Anonymous email users

2024-06-23 Thread Sebastian Wells via Python-list
And even if I did, you can't even trust e-mail providers not to give your address out to spammers. The only function e-mail addresses serve now is to positively identify the sender of a Usenet posting so he can be targeted for harassment, lawsuits, or worse. -- https://mail.python.org/mailman/listinfo/python-list

Re: Decoding bytes to text strings in Python 2

2024-06-23 Thread Rayner Lucas via Python-list
In article , r...@zedat.fu- berlin.de says... > > I didn't really do a super thorough deep dive on this, > but I'm just giving the initial impression without > actually being familiar with Tkinter under Python 2, > so I might be wrong! > > The Text widget typicall

Re: Decoding bytes to text strings in Python 2

2024-06-23 Thread Rayner Lucas via Python-list
In article , ros...@gmail.com says... > > If you switch to a Linux system, it should work correctly, and you'll > be able to migrate the rest of the way onto Python 3. Once you achieve > that, you'll be able to operate on Windows or Linux equivalently, > since Python 3 solv

How to go about a simple object grabbing in python (given coordinates of arms and objects)

2024-06-23 Thread marc nicole via Python-list
get_transformer_list, axis_mask_list, times). src: http://doc.aldebaran.com/1-14/dev/python/examples/almath/index.html?highlight=offset This question is specific to NAO environment but in general how to go about this task? what is a most common algorithm used in this case? Do I have to also get th

Re: [Tutor] How to go about a simple object grabbing in python (given coordinates of arms and objects)

2024-06-22 Thread marc nicole via Python-list
; Could you specify what is wrong with what you are doing? you show us code > that uses an environment you point to that is largely outside of basic > Python. > > There is no one way to get from point A to point B and various constraints > you have not mentioned can apply. How ma

Re: Decoding bytes to text strings in Python 2

2024-06-21 Thread Chris Angelico via Python-list
On Sat, 22 Jun 2024 at 03:28, Rayner Lucas via Python-list wrote: > I'm curious about something I've encountered while updating a very old > Tk app (originally written in Python 1, but I've ported it to Python 2 > as a first step towards getting it running on modern systems). >

Decoding bytes to text strings in Python 2

2024-06-21 Thread Rayner Lucas via Python-list
I'm curious about something I've encountered while updating a very old Tk app (originally written in Python 1, but I've ported it to Python 2 as a first step towards getting it running on modern systems). The app downloads emails from a POP server and displays them. At the moment, the code

glibc strverscmp called from python

2024-06-20 Thread vallor via Python-list
So there's been discussion in comp.lang.c and comp.unix.shell about doing a "versionsort(3)" type sort on a list of parameters. glibc offers strverscmp(3) for this type of sort, and here I am posting a q python program to expose that to its sort routine for commentary and future

Re: Timezone in HH:MM Format

2024-06-18 Thread Ivan "Rambius" Ivanov via Python-list
Thank you all for your responses! On Tue, Jun 18, 2024 at 9:54 PM Jon Ribbens via Python-list wrote: > > datetime.now(ZoneInfo("America/New_York")).isoformat() Both .isoformat() and "%:z" work. -- Tangra Mega Rock: http://www.radiotangra.com -- https://mail.p

Re: Timezone in HH:MM Format

2024-06-18 Thread Jon Ribbens via Python-list
:24:09-04:00 > > The closest I got in python is > > from datetime import datetime > from zoneinfo import ZoneInfo > > s = datetime.strftime(datetime.now(ZoneInfo("America/New_York")), > "%Y-%m-%dT%H:%M:%S%z") > print(s) > > This prints the same as

Re: Timezone in HH:MM Format

2024-06-18 Thread MRAB via Python-list
On 2024-06-19 00:32, Ivan "Rambius" Ivanov via Python-list wrote: Hello, How can I convert a date, usually datetime.now(), into a format where the timezone is in hours:minutes format. I was able to get that format in shell: $ date +%Y-%m-%dT%H:%M:%S%:z 2024-06-18T19:24:09-04:00 The

Timezone in HH:MM Format

2024-06-18 Thread Ivan "Rambius" Ivanov via Python-list
Hello, How can I convert a date, usually datetime.now(), into a format where the timezone is in hours:minutes format. I was able to get that format in shell: $ date +%Y-%m-%dT%H:%M:%S%:z 2024-06-18T19:24:09-04:00 The closest I got in python is from datetime import datetime from zoneinfo import

Re: in Python: (101 102 103 201 202 203 301 302 303 401 402 403 )

2024-06-18 Thread Peter J. Holzer via Python-list
On 2024-06-14 06:10:06 -, candycanearter07 via Python-list wrote: > Phil Carmody wrote at 12:01 this Thursday (GMT): > > I'd say you can't beat the verbosity, or lack thereof of just plain > > zsh/bash: > > $ echo {1,2,3,4}0{1,2,3} > > 101 102 103 201 202

Re: Anonymous email users

2024-06-18 Thread Grant Edwards via Python-list
On 2024-06-18, Mats Wichmann via Python-list wrote: > On 6/17/24 17:51, dn via Python-list wrote: > >> +1 >> >> The "public" part is not to embarrass posters, but recognition that >> there are likely other people 'out there' (or arriving in-futu

Re: Anonymous email users

2024-06-18 Thread Mats Wichmann via Python-list
On 6/17/24 17:51, dn via Python-list wrote: +1 The "public" part is not to embarrass posters, but recognition that there are likely other people 'out there' (or arriving in-future if they care to read the archives) experiencing a similar problem. (hence need for descriptive Sub

Re: win32clipboard writing to clipboard on Windows 11

2024-06-18 Thread Eryk Sun via Python-list
(win32clipboard.CF_UNICODETEXT, hMem) # Now the system owns the global memory. except: kernel32.GlobalFree(hMem) raise -- https://mail.python.org/mailman/listinfo/python-list

Re: win32clipboard writing to clipboard on Windows 11

2024-06-18 Thread Eryk Sun via Python-list
On Mon, Jun 17, 2024 at 8:36 PM MRAB via Python-list wrote: > On 2024-06-17 20:27, Rob Cliffe via Python-list wrote: > > > SetClipboardData(CF_UNICODETEXT, "0") > > CloseClipboard() win32clipboard.SetClipboardData() first tries to covert the second argument as an int

Re: win32clipboard writing to clipboard on Windows 11

2024-06-17 Thread Thomas Passin via Python-list
On 6/17/2024 9:30 PM, MRAB via Python-list wrote: On 2024-06-17 20:27, Rob Cliffe via Python-list wrote: Recently I acquired a new laptop running WIndows 11; my previous one uses WIndows 10.  I encountered a strange problem: I am using the win32clipboard backage (part of pywin32), and when I

Re: win32clipboard writing to clipboard on Windows 11

2024-06-17 Thread MRAB via Python-list
On 2024-06-17 20:27, Rob Cliffe via Python-list wrote: Recently I acquired a new laptop running WIndows 11; my previous one uses WIndows 10.  I encountered a strange problem: I am using the win32clipboard backage (part of pywin32), and when I use SetClipboardData() to write text which consists

Re: Anonymous email users

2024-06-17 Thread dn via Python-list
On 18/06/24 05:29, Roel Schroeven via Python-list wrote: AVI GROSS via Python-list schreef op 17/06/2024 om 17:03: I simply am thinking that people who do not allow me to easily reply to them directly, should be ignored by me and not get my cooperation that way. FWIW, personally I (mostly

RE: Anonymous email users

2024-06-17 Thread AVI GROSS via Python-list
the group and I would not have received some chances to learn if I could not ask questions in private that clearly did not fit the purpose of the group. So, I am outa this conversation IN PUBLIC. LOL! -Original Message----- From: Python-list On Behalf Of Grant Edwards via Python-list Sent: Monda

Re: Anonymous email users

2024-06-17 Thread Grant Edwards via Python-list
On 2024-06-17, Roel Schroeven via Python-list wrote: > FWIW, personally I (mostly) don't see the point of replying to people > personally. To me a public mailing list is much like any public forum, > where my expectation is that conversations happen in public. To me it > always

win32clipboard writing to clipboard on Windows 11

2024-06-17 Thread Rob Cliffe via Python-list
o far Traceback (most recent call last):   File "C:\TEST*.PY", line 8, in     SetClipboardData(CF_UNICODETEXT, "0") pywintypes.error: (0, 'SetClipboardData', 'No error message is available') Can anyone shed light on this? Best wishes Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Anonymous email users

2024-06-17 Thread Roel Schroeven via Python-list
AVI GROSS via Python-list schreef op 17/06/2024 om 17:03: I simply am thinking that people who do not allow me to easily reply to them directly, should be ignored by me and not get my cooperation that way. FWIW, personally I (mostly) don't see the point of replying to people personally. To me

RE: Anonymous email users

2024-06-17 Thread AVI GROSS via Python-list
that it seems the discussions with people in the email list are more useful to me. -Original Message- From: Python-list On Behalf Of Marco Moock via Python-list Sent: Saturday, June 15, 2024 2:03 AM To: python-list@python.org Subject: Re: Anonymous email users On 15.06.2024 um 10:30 Uhr dn wrote

Re: Anonymous email users

2024-06-17 Thread Marco Moock via Python-list
On 15.06.2024 um 10:30 Uhr dn wrote: > These mailing-lists all run under the Python Code of Conduct. > > This also effects a conundrum. Firstly, that someone abusing others > (for example) shall be held responsible. Secondly, that in order to > hold someone responsible,

  1   2   3   4   5   6   7   8   9   10   >