Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-18 Thread DL Neil via Python-list
On 19/03/20 3:28 PM, Santiago Basulto wrote: ...> myself missing A LOT features from NumPy, like fancy indexing or boolean arrays. So, has it ever been considered to bake into Python's builtin list and dictionary types functionality inspired by NumPy? I think multi indexing alone would be huge a

Re: ZipFile and timestamps

2020-03-18 Thread Manfred Lotz
On Wed, 18 Mar 2020 21:41:10 + MRAB wrote: > On 2020-03-18 20:38, Manfred Lotz wrote: > > I unzip a zip file like follows which works fine. > > > > with ZipFile(zip_file, 'r') as zip: > > zip.extractall(tmp_dir) > > > > The only caveat is that the unpacked files and dirs do have

PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-18 Thread Santiago Basulto
Hello community. I have an idea to share with the list to see what you all think about it. I happen to use both Python for Data Science (with our regular friends NumPy and Pandas) as well as for scripting and backend development. Every time I'm working in server-side Python (not the PyData stack),

Re: Why is the program not printing three lines?

2020-03-18 Thread Chris Angelico
On Thu, Mar 19, 2020 at 12:30 PM Souvik Dutta wrote: > > Hi, > I wrote a purposeless code today. > > class first(): > print("From first") > def second(): > print("From second") > first() > first.second() > > > Now the output I get is > From first > From second > > But when I comm

Why is the program not printing three lines?

2020-03-18 Thread Souvik Dutta
Hi, I wrote a purposeless code today. class first(): print("From first") def second(): print("From second") first() first.second() Now the output I get is >From first >From second But when I comment the call of first that is the comment the second last line of the code (#first()

Re: How to build python binaries including external modules

2020-03-18 Thread James via Python-list
On Wednesday, March 18, 2020 at 4:44:46 PM UTC-7, Michael Torrie wrote: > Cython requires a working Python interpreter to run the setup.py. How > would that work when building python itself? Python binary is built with a host of default modules. My question was how to promote external module(s)

Re: How to build python binaries including external modules

2020-03-18 Thread Dan Stromberg
For a rather involved example of using a shell wrapper to build a bunch of python-related stuff, feel free to raid http://stromberg.dnsalias.org/svn/cpythons/trunk/ for ideas. Or even just use it. It builds python 1.0 - 3.9, and installs some dependencies like cython, pygobject and numpy. On We

Re: How to build python binaries including external modules

2020-03-18 Thread Dan Stromberg
I'm not completely sure I understand what the question is. You can 'python3 -m pip install cython'. You can use a shell/powershell wrapper that invokes the two things in series. Does that help? On Wed, Mar 18, 2020 at 4:10 PM James via Python-list < python-list@python.org> wrote: > When you bu

Re: How to build python binaries including external modules

2020-03-18 Thread Michael Torrie
On 2020-03-18 5:06 p.m., James via Python-list wrote: > When you build python binaries from source, how to add external modules? > For example, to install cython, conventional method is building python first, > then running setup.py for cython. > I'd like to combine the 2-step into one. Cython re

How to build python binaries including external modules

2020-03-18 Thread James via Python-list
When you build python binaries from source, how to add external modules? For example, to install cython, conventional method is building python first, then running setup.py for cython. I'd like to combine the 2-step into one. Thanks James -- https://mail.python.org/mailman/listinfo/python-list

Re: Please Help! Absolute Novice - New Job, have this task.

2020-03-18 Thread bob gailer
Request for future: give us a specific subject e.g. how do I restore a button's text/color ? On 3/18/2020 6:05 PM, mjnash...@gmail.com wrote: Absolute beginner here, have no idea what I am doing wrong. All I want to do here is have the pushButton in PyQt5 to change to "Working..." and Red when

Please Help! Absolute Novice - New Job, have this task.

2020-03-18 Thread mjnash194
Absolute beginner here, have no idea what I am doing wrong. All I want to do here is have the pushButton in PyQt5 to change to "Working..." and Red when clicked... which it currently does. Thing is I need it to also change back to the default "SCAN" and Green color when done running that method

Re: Tkinter: which ttk widget for database table primary key?

2020-03-18 Thread Rich Shepard
On Wed, 18 Mar 2020, MRAB wrote: You can make the Entry widget read-only: entry_widget['state'] = 'readonly' The user will still be able to copy from it. Alternatively, you can disable it: entry_widget['state'] = 'disabled' The user won't be able to copy from it. When updating the GUI,

Re: Tkinter: which ttk widget for database table primary key?

2020-03-18 Thread Rich Shepard
On Wed, 18 Mar 2020, Christian Gollwitzer wrote: You can use an Entry and set it to readonly state. Or you can use a Label. The advantage of the readonly Entry is, that the user can still copy/paste the content, and that it can scroll if the string is very long. Christian, Thank you. I did no

[ANN] PyYAML-5.3.1: YAML parser and emitter for Python

2020-03-18 Thread Tina Müller
=== Announcing PyYAML-5.3.1 === A new release of PyYAML is now available: https://pypi.org/project/PyYAML/ This release contains a security fix for CVE-2020-1747. FullLoader was still exploitable for arbitrary command execution. https://bugzilla.redhat.com

Re: ZipFile and timestamps

2020-03-18 Thread MRAB
On 2020-03-18 20:38, Manfred Lotz wrote: I unzip a zip file like follows which works fine. with ZipFile(zip_file, 'r') as zip: zip.extractall(tmp_dir) The only caveat is that the unpacked files and dirs do have a current timestamp i.e. the timestamps of the files are not preserved.

Re: Tkinter: which ttk widget for database table primary key?

2020-03-18 Thread MRAB
On 2020-03-18 20:39, Rich Shepard wrote: Subject might be confusing so I'll expand it here. My application uses a database backend in which each table has a unique and database-generated sequential numeric key. I want to display that key in the GUI for that class but it's not entered by the user

Re: Tkinter: which ttk widget for database table primary key?

2020-03-18 Thread Christian Gollwitzer
Am 18.03.20 um 21:39 schrieb Rich Shepard: Subject might be confusing so I'll expand it here. My application uses a database backend in which each table has a unique and database-generated sequential numeric key. I want to display that key in the GUI for that class but it's not entered by the

Tkinter: which ttk widget for database table primary key?

2020-03-18 Thread Rich Shepard
Subject might be confusing so I'll expand it here. My application uses a database backend in which each table has a unique and database-generated sequential numeric key. I want to display that key in the GUI for that class but it's not entered by the user or altered. It seems to me that the ttk.E

ZipFile and timestamps

2020-03-18 Thread Manfred Lotz
I unzip a zip file like follows which works fine. with ZipFile(zip_file, 'r') as zip: zip.extractall(tmp_dir) The only caveat is that the unpacked files and dirs do have a current timestamp i.e. the timestamps of the files are not preserved. Is there a way to tell ZipFile to preserve

Re: How to fit & predict in Cat-boost Algorithm

2020-03-18 Thread Barry Scott
> On 18 Mar 2020, at 08:59, princit wrote: > > I am new in python. I am trying to predict the "time_to_failure" for given > "acoustic_data" in the test CSV file using catboost algorithm. > > > def catbostregtest(X_train, y_train): ># submission format >submission = pd.read_csv('sa

How to fit & predict in Cat-boost Algorithm

2020-03-18 Thread princit
I am new in python. I am trying to predict the "time_to_failure" for given "acoustic_data" in the test CSV file using catboost algorithm. def catbostregtest(X_train, y_train): # submission format submission = pd.read_csv('sample_submission.csv', index_col='seg_id') X_test = pd.Data

Re: Reduce waiting queue at supermarket from Corona with Python-Webapp

2020-03-18 Thread joseph pareti
all right, I have informed my contact person at Facebook. I'll let you know if anything positive comes out of it Am Mi., 18. März 2020 um 08:09 Uhr schrieb Orges Leka : > Thanks Christian for your suggestion. > > I made the start here > https://github.com/orgesleka/supermarket-waiting-queue-alarm

Re: Reduce waiting queue at supermarket from Corona with Python-Webapp

2020-03-18 Thread Orges Leka
Thanks Christian for your suggestion. I made the start here https://github.com/orgesleka/supermarket-waiting-queue-alarm The incomplete Flask/Jquery app is hosted here: http://www.orges-leka.de/limburg.html If someone can contribute by hosting this app for his city/community and spreading the link