Re: From JoyceUlysses.txt -- words occurring exactly once

2024-06-08 Thread Larry Martell via Python-list
On Sat, Jun 8, 2024 at 10:39 AM Mats Wichmann via Python-list < python-list@python.org> wrote: > On 6/5/24 05:10, Thomas Passin via Python-list wrote: > > > Of course, we see this lack of clarity all the time in questions to the > > list. I often wonder how these askers can possibly come up with

Re: Serializing pydantic enums

2024-05-29 Thread Larry Martell via Python-list
On Wed, May 29, 2024 at 12:27 PM Larry Martell wrote: > > On Tue, May 28, 2024 at 11:46 AM Left Right via Python-list > wrote: > > > > Most Python objects aren't serializable into JSON. Pydantic isn't > > special in this sense. > > > > What ca

Re: Serializing pydantic enums

2024-05-29 Thread Larry Martell via Python-list
Yeah, I know I can do this, but I seem to recall reading that pydantic handled serialization. Guess not. > On Tue, May 28, 2024 at 2:50 PM Larry Martell via Python-list > wrote: > > > > Just getting started with pydantic. I have this example code: > > > > class

Serializing pydantic enums

2024-05-28 Thread Larry Martell via Python-list
Just getting started with pydantic. I have this example code: class FinishReason(Enum): stop = 'stop' class Choice(BaseModel): finish_reason: FinishReason = Field(...) But I cannot serialize this: json.dumps(Choice(finish_reason=FinishReason.stop).dict()) *** TypeError: Object of type

Re: PyCon

2024-05-17 Thread Larry Martell via Python-list
LOn Fri, May 17, 2024 at 8:57 PM Larry Martell wrote: > I’m at PyCon in Pittsburgh and I’m haven’t an amazing time! s/haven’t/having/ -- https://mail.python.org/mailman/listinfo/python-list

PyCon

2024-05-17 Thread Larry Martell via Python-list
I’m at PyCon in Pittsburgh and I’m haven’t an amazing time! -- https://mail.python.org/mailman/listinfo/python-list

Re: Version of NymPy

2024-05-15 Thread Larry Martell via Python-list
On Wed, May 15, 2024 at 2:43 PM Popov, Dmitry Yu via Python-list wrote: > > What would be the easiest way to learn which version of NumPy I have with my > Anaconda distribution? >>> import numpy >>> numpy.__version__ '1.24.4' -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-30 Thread Larry Martell via Python-list
On Tue, Jan 30, 2024 at 1:13 AM AVI GROSS via Python-list wrote: > > It can be quite frustrating figuring out what someone wants, Grant, > especially when they just change it. > > It is worse when instead of starting a new thread with an appropriate > subject line, it continues and old one that wa

Re: Running a subprocess in a venv

2023-10-21 Thread Larry Martell via Python-list
On Sat, Oct 21, 2023 at 12:10 PM Johannes Findeisen wrote: > > On Sat, 21 Oct 2023 11:32:03 -0400 > Larry Martell wrote: > > > On Sat, Oct 21, 2023 at 9:49 AM Johannes Findeisen > > wrote: > > > > > > On Sat, 21 Oct 2023 09:01:18 -0400 > > > La

Re: Running a subprocess in a venv

2023-10-21 Thread Larry Martell via Python-list
On Sat, Oct 21, 2023 at 9:49 AM Johannes Findeisen wrote: > > On Sat, 21 Oct 2023 09:01:18 -0400 > Larry Martell via Python-list wrote: > > > I have a python script, and from that I want to run another script in > > a subprocess in a venv. What is the best way to do t

Running a subprocess in a venv

2023-10-21 Thread Larry Martell via Python-list
I have a python script, and from that I want to run another script in a subprocess in a venv. What is the best way to do that? I could write a file that activates the venv then runs the script, then run that file, but that seems messy. Is there a better way? -- https://mail.python.org/mailman/list

Re: path to python in venv

2023-09-27 Thread Larry Martell via Python-list
On Wed, Sep 27, 2023 at 12:53 PM Niktar Lirik wrote: > > Hi Larry, > > You could just create venv with option '—copies' > > > > For example: > > python -m venv -–copies .venv Thanks! That is just what I was looking for. > From: Larry Martell via Py

Re: path to python in venv

2023-09-27 Thread Larry Martell via Python-list
On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list wrote: > > On 2023-09-27, Larry Martell wrote: > > I was under the impression that in a venv the python used would be in > > the venv's bin dir. But in my venvs I see this in the bin dirs: > > > > lrw

path to python in venv

2023-09-27 Thread Larry Martell via Python-list
I was under the impression that in a venv the python used would be in the venv's bin dir. But in my venvs I see this in the bin dirs: lrwxrwxrwx 1 larrymartell larrymartell7 Sep 27 11:21 python -> python3 lrwxrwxrwx 1 larrymartell larrymartell 16 Sep 27 11:21 python3 -> /usr/bin/python3 Goo

Re: Why do I always get an exception raised in this __init__()?

2023-08-31 Thread Larry Martell via Python-list
On Thu, Aug 31, 2023 at 3:19 PM Chris Green via Python-list wrote: > > I'm obviously doing something very silly here but at the moment I > can't see what. > > Here's the code:- > > #!/usr/bin/python3 > # > # > # GPIO > # > import gpiod > # > # > # Simple wrapper

Re: pip-sync

2023-07-24 Thread Larry Martell via Python-list
On Fri, Jul 21, 2023 at 11:08 AM Larry Martell wrote: > > I am trying to set up and maintain a venv with pip-sync. On my bare > metal I have the apparmor python package installed, but it is not > installed in my venv and it's not in my requirements file. When I run > pip-s

pip-sync

2023-07-21 Thread Larry Martell via Python-list
I am trying to set up and maintain a venv with pip-sync. On my bare metal I have the apparmor python package installed, but it is not installed in my venv and it's not in my requirements file. When I run pip-sync I get: Found existing installation: apparmor 2.13.3 ERROR: Cannot uninstall 'apparmor

Re: TypeError: can only concatenate str (not "int") to str

2023-02-26 Thread Larry Martell
On Sun, Feb 26, 2023 at 5:46 PM Chris Angelico wrote: > On Mon, 27 Feb 2023 at 12:44, MRAB wrote: > > Oh dear. An example of Godwin's Law. > > Yeah, is that finally enough to get this user banned ? I hope so > -- https://mail.python.org/mailman/listinfo/python-list

Re: Rob Cliffe should stop sending me rude email messages.

2023-02-26 Thread Larry Martell
On Sun, Feb 26, 2023 at 3:49 PM Hen Hanna wrote: > > Rob Cliffe should stop sending me rude email messages. You should stop spamming this lists with with meaningless posts. -- https://mail.python.org/mailman/listinfo/python-list

Re: flattening lists

2022-10-11 Thread Larry Martell
On Tue, Oct 11, 2022 at 12:48 PM SquidBits _ wrote: > > Does anyone else think there should be a flatten () function, which just > turns a multi-dimensional list into a one-dimensional list in the order it's > in. e.g. > > [[1,2,3],[4,5,6,7],[8,9]] becomes [1,2,3,4,5,6,7,8,9]. > > I have had to

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Larry Martell
On Thu, Jun 9, 2022 at 11:44 AM Dave wrote: > > Hi, > > Before I write my own I wondering if anyone knows of a function that will > print a nicely formatted dictionary? > > By nicely formatted I mean not all on one line! >>> import json >>> d = {'John': 'Cleese', 'Eric': "Idle", 'Micheal': 'Pali

Re: terminate called after throwing an instance of 'boost::python::error_already_set

2022-05-27 Thread Larry Martell
On Fri, May 27, 2022 at 5:51 PM dn wrote: > On 28/05/2022 08.14, Larry Martell wrote: > > I have a script that has literally been running for 10 years. > > Suddenly, for some runs it crashes with the error: > > > > terminate called after throwing an i

terminate called after throwing an instance of 'boost::python::error_already_set

2022-05-27 Thread Larry Martell
I have a script that has literally been running for 10 years. Suddenly, for some runs it crashes with the error: terminate called after throwing an instance of 'boost::python::error_already_set No stack trace. Anyone have any thoughts on what could cause this and/or how I can track it down? -- h

Re: Why no list as dict key?

2022-04-20 Thread Larry Martell
On Wed, Apr 20, 2022 at 2:23 PM Abdur-Rahmaan Janhangeer wrote: > > Greetings list, > > Using Python3.9, i cannot assign a list [1, 2] as key > to a dictionary. Why is that so? Thanks in advanced! Dict keys cannot be mutable. Use a tuple instead. -- https://mail.python.org/mailman/listinfo/pytho

Re: calling a function asynchronously

2022-03-30 Thread Larry Martell
I do not get the errors I was getting before but it does not appear that my long running task is running at all. Still debugging. But concerting asyncio - doesn't run_until_complete block until long() completes? > > 30.03.2022 19:10, Larry Martell пишет: > > import asyncio > >

calling a function asynchronously

2022-03-30 Thread Larry Martell
I have a django app, and for a certain request I need to kick off a long running task. I want to do this asynchronously and immediately return a response. I tried using subprocess.Process() but the forked process does not have a django database connection. I then tried posting a request using ajax

Re: All permutations from 2 lists

2022-03-03 Thread Larry Martell
On Wed, Mar 2, 2022 at 9:42 PM Avi Gross via Python-list wrote: > > Larry, > > i waited patiently to see what others will write and perhaps see if you > explain better what you need. You seem to gleefully swat down anything > offered. So I am not tempted to engage. But then

Re: All permutations from 2 lists

2022-03-02 Thread Larry Martell
On Wed, Mar 2, 2022 at 5:31 PM Joel Goldstick wrote: > > On Wed, Mar 2, 2022 at 5:07 PM Larry Martell wrote: > > > > On Wed, Mar 2, 2022 at 5:00 PM Cameron Simpson wrote: > > > > > > On 02Mar2022 08:29, Larry Martell wrote: > > > >On Tue,

Re: All permutations from 2 lists

2022-03-02 Thread Larry Martell
On Wed, Mar 2, 2022 at 5:00 PM Cameron Simpson wrote: > > On 02Mar2022 08:29, Larry Martell wrote: > >On Tue, Mar 1, 2022 at 7:32 PM Rob Cliffe wrote: > >> I think itertools.product is what you need. > >> Example program: > >> > >> import iterto

Re: All permutations from 2 lists

2022-03-02 Thread Larry Martell
On Wed, Mar 2, 2022 at 10:26 AM Antoon Pardon wrote: > > > > Op 2/03/2022 om 15:58 schreef Larry Martell: > > On Wed, Mar 2, 2022 at 9:37 AM Antoon Pardon wrote: > >> > >>>>> If one list is empty I want just the other list. What I am doing is >

Re: All permutations from 2 lists

2022-03-02 Thread Larry Martell
On Wed, Mar 2, 2022 at 9:37 AM Antoon Pardon wrote: > > > > Op 2/03/2022 om 15:29 schreef Larry Martell: > > On Wed, Mar 2, 2022 at 9:10 AM Antoon Pardon wrote: > >> Op 2/03/2022 om 14:44 schreef Larry Martell: > >>> On Wed, Mar 2, 2022 at 8:37 AM Antoo

Re: All permutations from 2 lists

2022-03-02 Thread Larry Martell
On Wed, Mar 2, 2022 at 9:10 AM Antoon Pardon wrote: > > Op 2/03/2022 om 14:44 schreef Larry Martell: > > On Wed, Mar 2, 2022 at 8:37 AM Antoon Pardon wrote: > >> > >> Op 2/03/2022 om 14:27 schreef Larry Martell: > >>> On Tue, Mar 1, 2022 at

Re: All permutations from 2 lists

2022-03-02 Thread Larry Martell
On Wed, Mar 2, 2022 at 8:54 AM Joel Goldstick wrote: > > On Wed, Mar 2, 2022 at 8:46 AM Larry Martell wrote: > > > > On Wed, Mar 2, 2022 at 8:37 AM Antoon Pardon wrote: > > > > > > > > > Op 2/03/2022 om 14:27 schreef Larry Martell: > &g

Re: All permutations from 2 lists

2022-03-02 Thread Larry Martell
On Wed, Mar 2, 2022 at 8:37 AM Antoon Pardon wrote: > > > Op 2/03/2022 om 14:27 schreef Larry Martell: > > On Tue, Mar 1, 2022 at 7:21 PM<2qdxy4rzwzuui...@potatochowder.com> wrote: > >> On 2022-03-01 at 19:12:10 -0500, > >> Larry Martell wrote: > >&g

Re: All permutations from 2 lists

2022-03-02 Thread Larry Martell
le, I'm not sure of the > correct technical term). > If you only want to use the result once you can write e.g. > > for ops, reg in itertools.product(opsys, region): > etc. > > If you need it more than once, you can convert it to a list (or tuple), > as above. > Best

Re: All permutations from 2 lists

2022-03-02 Thread Larry Martell
On Tue, Mar 1, 2022 at 7:21 PM <2qdxy4rzwzuui...@potatochowder.com> wrote: > > On 2022-03-01 at 19:12:10 -0500, > Larry Martell wrote: > > > If I have 2 lists, e.g.: > > > > os = ["Linux","Windows"] > > region = ["us-east-1"

All permutations from 2 lists

2022-03-01 Thread Larry Martell
If I have 2 lists, e.g.: os = ["Linux","Windows"] region = ["us-east-1", "us-east-2"] How can I get a list of tuples with all possible permutations? So for this example I'd want: [("Linux", "us-east-1"), ("Linux", "us-east-2"), ("Windows", "us-east-1"), "Windows", "us-east-2')] The lists can b

problem reading a CSV file

2021-12-13 Thread Larry Warner
Win 10, Chrome, Python 3.10.1 New at python error on open statement Probably simple error but I do not see it. The program is a python example with the file name being changed. I want to experiment with changing the literal file name in the open statement to a variable name later. Larry

python problem

2021-12-08 Thread Larry Warner
I am new at Python. I have installed Python 3.10.1 and the latest Pycharm. When I attempt to execute anything via Pycharm or the command line, I receive a message it can not find Python. I do not know where Python was loaded or where to find and to update PATH to the program. Larry -- https

Re: SQLALchemy: update with in clause from kwargs

2021-08-04 Thread Larry Martell
On Tue, Aug 3, 2021 at 7:26 PM dn via Python-list wrote: > > On 04/08/2021 13.08, Larry Martell wrote: > > I am trying to write a function that takes kwargs as a param and > > generates an update statement where the rows to be updated are > > specified in an in clause. >

SQLALchemy: update with in clause from kwargs

2021-08-03 Thread Larry Martell
I am trying to write a function that takes kwargs as a param and generates an update statement where the rows to be updated are specified in an in clause. Something like this: def update_by_in(self, **kwargs): filter_group = [] for col in kwargs['query_params']: #

Re: Is there a conference in the US that is similar to EuroPython?

2021-07-19 Thread Larry Martell
On Mon, Jul 19, 2021 at 10:01 AM Schachner, Joseph wrote: > > I am not going to fly to Europe for a Python conference. But, would consider > going if in the U.S.A. Especially if drivable ... NYC area would be ideal. > > I ask because I have seen ads for EuroPython over several years, and I don

Re: creating raw AWS log event

2021-06-24 Thread Larry Martell
On Thu, Jun 24, 2021 at 10:38 AM Larry Martell wrote: > > On Thu, Jun 24, 2021 at 12:20 AM Peter Otten <__pete...@web.de> wrote: > > > > On 23/06/2021 19:42, Larry Martell wrote: > > > When an AWS cloudwatch event is passed to a consumer it looks like this:

Re: creating raw AWS log event

2021-06-24 Thread Larry Martell
On Thu, Jun 24, 2021 at 12:20 AM Peter Otten <__pete...@web.de> wrote: > > On 23/06/2021 19:42, Larry Martell wrote: > > When an AWS cloudwatch event is passed to a consumer it looks like this: > > > > { > > "awslogs": { > > "

Re: creating raw AWS log event

2021-06-23 Thread Larry Martell
On Wed, Jun 23, 2021 at 7:05 PM Dennis Lee Bieber wrote: > > On Wed, 23 Jun 2021 10:42:42 -0700, Larry Martell > declaimed the following: > > >def _decode(data): > >compressed_payload = b64decode(data) > >json_payload = zlib.decompress(compressed_payload, 16

creating raw AWS log event

2021-06-23 Thread Larry Martell
When an AWS cloudwatch event is passed to a consumer it looks like this: { "awslogs": { "data": "ewogICAgIm1l..." } } To get the actual message I do this: def _decode(data): compressed_payload = b64decode(data) json_payload = zlib.decompress(compressed_payload, 16+zlib.

Best practices regarding PYTHONPATH

2021-03-09 Thread Larry Martell
Which is considered better? Having a long import path or setting PYTHONPATH? For example, in a project where 50% of the imports come from the same top level directory is it better to add that dir to the path or reference it in the import statements? -- https://mail.python.org/mailman/listinfo/pyt

Re: yield from () Was: Re: weirdness with list()

2021-03-02 Thread Larry Martell
On Tue, Mar 2, 2021 at 2:16 PM Chris Angelico wrote: > > On Tue, Mar 2, 2021 at 5:51 AM Alan Gauld via Python-list > wrote: > > > > On 28/02/2021 00:17, Cameron Simpson wrote: > > > > > BUT... It also has a __iter__ value, which like any Box iterates over > > > the subboxes. For MDAT that is impl

Re: comparing two lists

2021-02-24 Thread Larry Martell
On Wed, Feb 24, 2021 at 4:45 PM Davor Levicki wrote: > > i have two lists > > list1 = ['01:15', 'abc', '01:15', 'def', '01:45', 'ghi' ] > list2 = ['01:15', 'abc', '01:15', 'uvz', '01:45', 'ghi' ] > > and when I loop through the list > > > list_difference = [] > for item in list1: > > if item no

Re: How do you find what exceptions a class can throw?

2020-12-21 Thread Larry Martell
On Sun, Dec 20, 2020 at 9:36 PM Chris Angelico wrote: > > On Mon, Dec 21, 2020 at 1:11 PM Julio Di Egidio wrote: > > > Gathering evidence is indeed part of science, and computer science is > > > indeed mathematics, but alas programmering is just a craft and software > > > engineering often ... is

Re: list of dictionaries search using kwargs

2020-12-07 Thread Larry Martell
urn all matches > > Beware though that either of these will be slow if your list of dicts is > large. > If the list is large enough that this becomes slow, consider using a database > (e.g. sqlite or other SQL DB) instead. Thanks! Works perfectly. > On 7 Dec 2020, 22:06 +, La

Re: list of dictionaries search using kwargs

2020-12-07 Thread Larry Martell
On Mon, Dec 7, 2020 at 5:29 PM Marco Sulla wrote: > > You can return dictionaries that returns True if > > (a.items() & kwargs.items()) == kwargs.items() > > when `a` is one of your dicts. But what is passed in kwargs will not necessarily have values for all of the keys and I only want to check f

list of dictionaries search using kwargs

2020-12-07 Thread Larry Martell
I have a class that has an object that contains a list of dicts. I want to have a class method that takes a variable number of key/value pairs and searches the list and returns the item that matches the arguments. If I know the key value pairs I can do something like this: instance = next(item fo

numpy problem (follow up)

2020-11-28 Thread Larry Burford
I have completed reloading Still getting the error msg for numpy Gentlemen/Ladies, new to visual studio new-ish to python (I hope this is more to do with python ...) ~5 yr old HP with 16 GB,  1 TB,  W10 pro,  python 3.9.0,  VSCode 1.51.1,  3 monitor desktop when trying to run th

Re: Time Date Conversion?

2020-11-04 Thread Larry Martell
On Wed, Nov 4, 2020 at 6:21 PM Steve wrote: > > The text File entry is: >BPd 2020-11-04 17:28:03.352027 66 > > I bring it into the program using: > with open("_TIME-DATE.txt" , 'r') as infile: > for lineEQN in infile: # loop to find each line in the file for that > dose > and set it in a

Re: python mariadb & html tables

2020-09-15 Thread Larry Martell
On Tue, Sep 15, 2020 at 1:35 PM SS wrote: > > On Tuesday, September 15, 2020 at 2:52:35 PM UTC-4, larry.mart...@gmail.com > wrote: > > On Tue, Sep 15, 2020 at 11:45 AM SS wrote: > > > > > > I'm trying to create an table in html from a Maria DB table, from a > > > python script. I'm getting some

Re: python mariadb & html tables

2020-09-15 Thread Larry Martell
On Tue, Sep 15, 2020 at 11:45 AM SS wrote: > > I'm trying to create an table in html from a Maria DB table, from a python > script. I'm getting some unexpected results. > > The environment is Centos 7, I'm using Python3 with apache. > > Here is copy of the script I'm using: > > *** SCRIPT ST

[RELEASED] Python 3.5.10 is released

2020-09-05 Thread Larry Hastings
On behalf of the Python development community, I'm plesed to announce the availability of Python 3.5.10. Python 3.5 is in "security fixes only" mode.  This new version only contains security fixes, not conventional bug fixes, and it is a source-only release. Important Notice: The latest re

Re: grouping and sorting within groups using another list

2020-09-02 Thread Larry Martell
On Wed, Sep 2, 2020 at 11:22 AM David Raymond wrote: > > Would it be something as simple as: > > rows.sort(key = lambda x: (x[0], x[3], x[4], sort_list.index(x[6]))) This is perfect - thanks! > -Original Message- > From: Python-list > On Behalf Of Larry Mart

grouping and sorting within groups using another list

2020-09-02 Thread Larry Martell
I have a list of tuples, and I want to group them by 3 items (0, 3, 4) and then within each group sort the data by a 4th item (6) using a sort order from another list. The list is always ordered by the 3 grouping items. For example, if I have this list: rows = [('a', 'b', 'c', 'd', 'e', 'f', 'blue

[RELEASED] Python 3.5.10rc1 is released

2020-08-21 Thread Larry Hastings
On behalf of the Python development community, I'm pleased to finally announce the availability of Python 3.5.10rc1. Python 3.5 is in "security fixes only" mode.  This new version only contains security fixes, not conventional bug fixes, and it is a source-only release. Important Notice: T

Re: Python database compatibility

2020-06-12 Thread Larry Martell
On Fri, Jun 12, 2020 at 5:03 PM Siddharth Joshi wrote: > > All, > > I am new in Python world and would like to use it for one of the our > purpose . Before that, I would like to ask if Python has compatibility with > ENSCRIBE database . > > Enscribe database (file structured) is the native databas

Re: exiting a while loop

2020-05-22 Thread Larry Martell
On Fri, May 22, 2020 at 7:51 AM John Yeadon via Python-list wrote: > > Am I unreasonable in expecting this code to exit when required? > > > # Add up the powers of 2 starting with 2**0 until 2 million is met. > n = 1 > target = 200 > sum = 0 > > while True: > x = 2 ** (n - 1) > sum +

Re: Display, EasyProcess

2020-05-21 Thread Larry Martell
On Thu, May 21, 2020 at 3:44 AM Peter Otten <__pete...@web.de> wrote: > > Larry Martell wrote: > > > I have some code that uses the pyvirtualdisplay package and it works fine. > > > > pyvirtualdisplay,Display calls EasyProcess like this: > > > >

Display, EasyProcess

2020-05-20 Thread Larry Martell
I have some code that uses the pyvirtualdisplay package and it works fine. pyvirtualdisplay,Display calls EasyProcess like this: @classmethod def check_installed(cls): EasyProcess([PROGRAM, '-help'], url=URL, ubuntu_package=PACKAGE).check_installed(

Re: Can one make 'in' ungreedy?

2020-05-18 Thread Larry Martell
On Mon, May 18, 2020 at 7:05 AM Chris Green wrote: > > I have a strange/minor problem in a Python program I use for mail > filtering. > > One of the ways it classifies messages is by searching for a specific > string in square brackets [] in the Subject:, the section of code that > does this is:-

Re: pyodbc slowness

2020-03-04 Thread Larry Martell
On Wed, Mar 4, 2020 at 3:20 PM Larry Martell wrote: > > I have some Python code that uses pyodbc to talk to a SQL Server database. In > that code I do an INSERT INTO SELECT * FROM > > That query takes around 3 times longer to run when invoked from Python with > py

pyodbc slowness

2020-03-04 Thread Larry Martell
I have some Python code that uses pyodbc to talk to a SQL Server database. In that code I do an INSERT INTO SELECT * FROM That query takes around 3 times longer to run when invoked from Python with pyodbc than when run with direct SQL. On one system we have 1,667 rows and the timings a

Re: A small quiz

2020-01-23 Thread Larry Martell
On Thu, Jan 23, 2020 at 3:56 AM Z wrote: > > what is PLR? Past Life Regression -- https://mail.python.org/mailman/listinfo/python-list

[RELEASED] Python 3.5.9 is released

2019-11-01 Thread Larry Hastings
On behalf of the Python development community, I'm slightly chagrined to announce the availability of Python 3.5.9.  There were no new changes in version 3.5.9; 3.5.9 was released only because of a CDN caching problem, which resulted in some users downloading a prerelease version of the 3.5.8

[WARNING] Some users who downloaded the Python 3.5.8 .xz tarball got the wrong version

2019-10-30 Thread Larry Hastings
Due to awkward CDN caching, some users who downloaded the source code tarballs of Python 3.5.8 got a preliminary version instead of the final version.  As best as we can tell, this only affects the .xz release; there are no known instances of users downloading an incorrect version of the .tgz

[RELEASED] Python 3.5.8 is (finally) released

2019-10-28 Thread Larry Hastings
On behalf of the Python development community, I'm relieved to announce the availability of Python 3.5.8. Python 3.5 is in "security fixes only" mode.  This new version only contains security fixes, not conventional bug fixes, and it is a source-only release. You can find Python 3.5.8 here

[RELEASED] Python 3.5.8rc2 is released

2019-10-12 Thread Larry Hastings
On behalf of the Python development community, I'm relieved to announce the availability of Python 3.5.8rc2.  It's been a month after Python 3.5.8rc1, and since then we've added a small amount of new code to fix an API-level regression in http client, updated expat to 2.2.8, and upgraded the

Re: TechRepublicDEVELOPERCXO JPMorgan's Athena has 35 million lines of Python code, and won't be updated to Python 3 in time

2019-09-14 Thread Larry Martell
On Fri, Sep 13, 2019 at 1:37 PM Skip Montanaro wrote: > > > https://www.techrepublic.com/google-amp/article/jpmorgans-athena-has-35-million-lines-of-python-code-and-wont-be-updated-to-python-3-in-time/ > > I doubt this is unusual, and presume JP Morgan is big enough to handle > the change of stat

TechRepublicDEVELOPERCXO JPMorgan's Athena has 35 million lines of Python code, and won't be updated to Python 3 in time

2019-09-13 Thread Larry Martell
https://www.techrepublic.com/google-amp/article/jpmorgans-athena-has-35-million-lines-of-python-code-and-wont-be-updated-to-python-3-in-time/ -- https://mail.python.org/mailman/listinfo/python-list

[RELEASED] Python 3.5.8rc1 is released

2019-09-09 Thread Larry Hastings
On behalf of the Python development community, I'm chuffed to announce the availability of Python 3.5.8rc1. Python 3.5 is in "security fixes only" mode.  This new version only contains security fixes, not conventional bug fixes, and it is a source-only release. You can find Python 3.5.8rc1

Re: MySQLdb for 3.6 on RHEL7

2019-08-13 Thread Larry Martell
On Tue, Aug 13, 2019 at 2:16 PM Chris Angelico wrote: > > On Wed, Aug 14, 2019 at 1:48 AM Larry Martell wrote: > > > > On Tue, Aug 13, 2019 at 9:59 AM Chris Angelico wrote: > > > > > > On Tue, Aug 13, 2019 at 11:33 PM Larry Martell > > > wrote: &

Re: MySQLdb for 3.6 on RHEL7

2019-08-13 Thread Larry Martell
On Tue, Aug 13, 2019 at 9:59 AM Chris Angelico wrote: > > On Tue, Aug 13, 2019 at 11:33 PM Larry Martell > wrote: > > > > I am trying to install MySQLdb (https://pypi.org/project/mysqlclient/) > > for python3.6 on RHEL7. > > > > When I import it, it fail

Re: MySQLdb for 3.6 on RHEL7

2019-08-13 Thread Larry Martell
On Tue, Aug 13, 2019 at 9:43 AM Inada Naoki wrote: > > Why do you use RHEL? That is not my choice. > I believe people use RHEL to get support from Red Hat, instead of community > support. I do not believe Red Hat supports this package. > > 2019年8月13日(火) 22:32 Larry Ma

MySQLdb for 3.6 on RHEL7

2019-08-13 Thread Larry Martell
I am trying to install MySQLdb (https://pypi.org/project/mysqlclient/) for python3.6 on RHEL7. When I import it, it fails: # python3.6 Python 3.6.8 (default, Jun 11 2019, 15:15:01) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux Type "help", "copyright", "credits" or "license" for more informati

Re: py2 to 3 base64 issues

2019-08-09 Thread Larry Martell
On Fri, Aug 9, 2019 at 3:17 PM MRAB wrote: > > On 2019-08-09 19:21, Larry Martell wrote: > > On Fri, Aug 9, 2019 at 12:23 PM Chris Angelico wrote: > >> > >> On Sat, Aug 10, 2019 at 2:09 AM Larry Martell > >> wrote: > >> > > >> >

Re: py2 to 3 base64 issues

2019-08-09 Thread Larry Martell
On Fri, Aug 9, 2019 at 12:23 PM Chris Angelico wrote: > > On Sat, Aug 10, 2019 at 2:09 AM Larry Martell wrote: > > > > I have some python 2 code: > > > > def decode(key, string): > >decoded_chars = [] > >string = base64.urlsafe_b64de

py2 to 3 base64 issues

2019-08-09 Thread Larry Martell
I have some python 2 code: def decode(key, string): decoded_chars = [] string = base64.urlsafe_b64decode(string) for i in range(len(string)): key_c = key[i % len(key)] encoded_c = chr(abs(ord(string[i]) - ord(key_c) % 256)) decoded_chars.append

Re: AttributeError: module 'itertools' has no attribute 'imap'

2019-08-08 Thread Larry Martell
On Thu, Aug 8, 2019 at 1:33 PM Peter Otten <__pete...@web.de> wrote: > > Larry Martell wrote: > > >> Pyke has been ported to py3. Here is the code that returns the data I > >> am trying to process: > >> > >> return map(self.doctor_answer, it) >

Re: AttributeError: module 'itertools' has no attribute 'imap'

2019-08-08 Thread Larry Martell
On Thu, Aug 8, 2019 at 12:34 PM Rhodri James wrote: > > On 08/08/2019 17:16, Larry Martell wrote: > > On Thu, Aug 8, 2019 at 11:30 AM Peter Otten <__pete...@web.de> wrote: > >> > >> Larry Martell wrote: > [snip] > >>> But in py3 that fa

Re: AttributeError: module 'itertools' has no attribute 'imap'

2019-08-08 Thread Larry Martell
On Thu, Aug 8, 2019 at 12:16 PM Larry Martell wrote: > > On Thu, Aug 8, 2019 at 11:30 AM Peter Otten <__pete...@web.de> wrote: > > > > Larry Martell wrote: > > > > > I have some code that is using the pyke package > > > (https://sourceforg

Re: AttributeError: module 'itertools' has no attribute 'imap'

2019-08-08 Thread Larry Martell
On Thu, Aug 8, 2019 at 11:30 AM Peter Otten <__pete...@web.de> wrote: > > Larry Martell wrote: > > > I have some code that is using the pyke package > > (https://sourceforge.net/projects/pyke/). That project seems fairly > > dead, so asking here. > > >

AttributeError: module 'itertools' has no attribute 'imap'

2019-08-08 Thread Larry Martell
I have some code that is using the pyke package (https://sourceforge.net/projects/pyke/). That project seems fairly dead, so asking here. There is a pyke function that returns a context manager with an iterable map. In py2.7 I did this: from pyke import knowledge_engine vasculopathy_engine = know

Re: How do you insert an item into a dictionary (in python 3.7.2)?

2019-06-28 Thread Larry Martell
On Fri, Jun 28, 2019 at 11:10 AM CrazyVideoGamez wrote: > > How do you insert an item into a dictionary? For example, I make a dictionary > called "dictionary". > > dictionary = {1: 'value1', 2: 'value3'} > > What if I wanted to add a value2 in the middle of value1 and value3? Dicts are not orde

Farewell, Python 3.4

2019-05-08 Thread Larry Hastings
It's with a note of sadness that I announce the final retirement of Python 3.4.  The final release was back in March, but I didn't get around to actually closing and deleting the 3.4 branch until this morning. Python 3.4 introduced many features we all enjoy in modern Python--the asyncio, en

Re: Friday Filosofical Finking: Import protections

2019-04-17 Thread Larry Martell
On 2019-04-17 21:20, DL Neil wrote: > Do you bother with exception handling for import statements? I often have to do something like this: try: from settings import SITE_WAFER_DIAMETER except ImportError: SITE_WAFER_DIAMETER = 300 -- https://mail.python.org/mailman/listinfo/python-list

python book

2019-04-16 Thread Larry Martell
https://www.reddit.com/r/Python/comments/bc2606/just_found_the_best_python_bookcover/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Might be doing this wrong? (Turtle graphics)

2019-03-25 Thread Larry Martell
On Mon, Mar 25, 2019 at 3:45 PM CrazyVideoGamez wrote: > wait no nevermind im such an idiot Every programmer I have ever known has said that. -- https://mail.python.org/mailman/listinfo/python-list

Re: Can my python program send me a text message?

2019-03-19 Thread Larry Martell
On Tue, Mar 19, 2019 at 3:30 PM Steve wrote: > > I have a program that triggers a reminder timer. When that timer is done, I > would like to receive a text message on my phone to tell me that it is time > to reset the experiment. > > Can this be done using Python? You can send a text with emai

Python 3.4.10 is now available

2019-03-18 Thread Larry Hastings
On behalf of the Python development community, I'm proud--if slightly sad--to announce the availability of Python 3.4.10. Python 3.4.10 was released in "security fixes only" mode.  It only contains security fixes, not conventional bug fixes, and it is a source-only release. Python 3.4.10 i

Python 3.5.7 is now available

2019-03-18 Thread Larry Hastings
On behalf of the Python development community, I'm chuffed to announce the availability of Python 3.5.7. Python 3.5 is in "security fixes only" mode.  It only accepts security fixes, not conventional bug fixes, and the release is source-only. And you can find Python 3.5.7rc1 here: https

Re: 3D visualizations in Python

2019-03-12 Thread Larry Martell
On Tue, Mar 12, 2019 at 6:55 PM Jakub Bista wrote: > > Hello. I want to do 3D visualization in Python. Which framework do you > recommend me for creating such a Interface? https://plot.ly/python/ -- https://mail.python.org/mailman/listinfo/python-list

[RELEASED] Python 3.4.10rc1 and Python 3.5.7rc1 are now available

2019-03-04 Thread Larry Hastings
On behalf of the Python development community, I'm chuffed to announce the availability of Python 3.4.10rc1 and Python 3.5.7rc1. Both Python 3.4 and 3.5 are in "security fixes only" mode.  Both versions only accept security fixes, not conventional bug fixes, and both releases are source-only

Re: OT - need help with PHP

2019-02-01 Thread Larry Martell
On Fri, Feb 1, 2019 at 10:30 AM Bob Gailer wrote: > I can't even figure out how to sign up for a PHP email list. http://php.net/manual/en/faq.mailinglist.php -- https://mail.python.org/mailman/listinfo/python-list

Re: Pythonic Y2K

2019-01-18 Thread Larry Martell
On Fri, Jan 18, 2019 at 4:56 PM Avi Gross wrote: > > Larry, > > I keep hearing similar things about the Flu Vaccine. It only works 40% of > the time or whatever. But most of the people that get the flu get a > different strain they were not vaccinated against! That seems l

  1   2   3   4   5   6   7   8   9   10   >