Re: Why no list as dict key?

2022-04-25 Thread Lars Liedtke
ll fail to see the application for that, which is most propably to ignorance rather than criticism. Cheers Lars -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de solute GmbH Zeppelinstraße 15

Re: Why no list as dict key?

2022-04-25 Thread Lars Liedtke
Thx, didn't see it that way yet. -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de solute GmbH Zeppelinstraße 15 76185 Karlsruhe Germany Marken der solute GmbH | brands of solute

Re: Python & nmap

2022-05-19 Thread Lars Liedtke
you start developing something like that in Python, you could as well write an ansible module and combine both, because Ansible itself is written in Python. Cheers Lars -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de s

Re: Python & nmap

2022-05-20 Thread Lars Liedtke
Ansible has got a shell module, so you could run custom commands on all hosts. But it gets more difficult in parsing the output afterwards. -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de solute GmbH Zeppelinstraße 15

Re: Logging into single file from multiple modules in python when TimedRotatingFileHandler is used

2022-06-22 Thread Lars Liedtke
-- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de solute GmbH Zeppelinstraße 15 76185 Karlsruhe Germany Marken der solute GmbH | brands of solute GmbH billiger.de | Shopping.de

Re: Logging into single file from multiple modules in python when TimedRotatingFileHandler is used

2022-06-22 Thread Lars Liedtke
aring. -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de solute GmbH Zeppelinstraße 15 76185 Karlsruhe Germany Marken der solute GmbH | brands of solute GmbH billiger.de | Shoppi

Re: why function throws an error?

2022-06-28 Thread Lars Liedtke
Hey, Which error does it throw? Could you please send the stacktrace as well? Cheers Lars -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de solute GmbH Zeppelinstraße 15 76185 Karlsruhe

Re: Trying to understand nested loops

2022-08-05 Thread Lars Liedtke
ongly, so if you could try to formulate in words what this loop does, I or other people on this list, will be pleased to show you where you might have got things wrong and how it really works. Cheers Lars -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 989

Re: Question about learning Python

2022-09-07 Thread Lars Liedtke
ely starting to learn how to program. Please correct me if I am wrong. So you can definitely learn how to program with learning Python and you can learn C afterwards if you need to. Cheers Lars -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 9

Re: problem downloading python

2022-09-14 Thread Lars Liedtke
maybe some more windows savvy people than me might chime in to offer better advice ;-) . Cheers Lars Lars Liedtke Software Entwickler [Tel.] [Fax] +49 721 98993- [E-Mail]l...@solute.de<mailto:l...@solute.de> solute GmbH Zeppelinstraße 15 76185 Karlsruhe Germany [Logo Solute]

Re: How to replace an instance method?

2022-09-18 Thread Lars Liedtke
change the old method to call the new method but with the parameters the new method expects. If you explain this in the docstrings as well. Then you do not need to actually replace the method. Or you had a completely different use-case in mind, that I missed. Cheers Lars Lars Liedtke Software

Re: Superclass static method name from subclass

2022-11-11 Thread Lars Liedtke
est.py yay Cheers Lars Lars Liedtke Software Entwickler [Tel.] +49 721 98993- [Fax] +49 721 98993- [E-Mail]l...@solute.de<mailto:l...@solute.de> solute GmbH Zeppelinstraße 15 76185 Karlsruhe Germany [Logo Solute] Marken der solute GmbH | brands of solute GmbH [Mark

Re: sqlite3 double quote behavior

2022-12-13 Thread Lars Liedtke
t you could let it build the queries for you. Of course, I know that this would mean a dependency and additional complexity. I just could not leave it unmentioned ;-) Cheers Lars Lars Liedtke Software Entwickler [Tel.] +49 721 98993- [Fax] +49 721 98993- [E-Mail]l...@solute.de<

Re: How to enter escape character in a positional string argument from the command line?

2022-12-21 Thread Lars Liedtke
Or you could have "native" bash ($SHELL) with WSL. But I assume not everyone is using it. Cheers Lars Lars Liedtke Software Entwickler [Tel.] +49 721 98993- [Fax] +49 721 98993- [E-Mail]l...@solute.de<mailto:l...@solute.de> solute GmbH Zeppelinstraße 15 76185 K

Re: Fast lookup of bulky "table"

2023-01-15 Thread Lars Liedtke
ulfil. All I am trying to say is to reconsider where you really could improve and how far you have to improve. Lars Liedtke Software Entwickler [Tel.] +49 721 98993- [Fax] +49 721 98993- [E-Mail]l...@solute.de<mailto:l...@solute.de> solute GmbH Zeppelinstraße 15 76185 Karlsruhe G

Re: 转发: How to exit program with custom code and custom message?

2023-03-13 Thread Lars Liedtke
an that the equivalent is: Yes, I know, but don’t you think if `sys.exit` can take more parameters and have a default output channel selection strategy will be better? Thanks. Lars Liedtke Software Entwickler [Tel.] +49 721 98993- [Fax] +49 721 98993- [E-Mail]l...@solute.de<mailto:l

Re: for a 'good python'

2023-04-13 Thread Lars Liedtke
Lars Liedtke Software Entwickler [Tel.] +49 721 98993- [Fax] +49 721 98993- [E-Mail]l...@solute.de<mailto:l...@solute.de> solute GmbH Zeppelinstraße 15 76185 Karlsruhe Germany [Logo Solute] Marken der solute GmbH | brands of solute GmbH [Marken] [Advertising P

Re: Pip standard error warning about dependency resolver

2021-02-24 Thread Lars Liedtke
w resolver. > Is there a way to suppress it? We have some back end operations that fail > when we get output on standard error, and they're dying from that notice. -- --- punkt.de GmbH Lars Liedtke .infrastructure Kaiserallee 13a 76133 Karlsruhe Tel. +49 721 9109 500 https://infra

Re: memory consumption

2021-03-29 Thread Lars Liedtke
rowing exception. > 3. Use separate queue for such tasks, but then worker will stay idle most of > the time. > All this is looks like a crutch. Do I have any other options ? > > I'm using: > Python - 3.6.13 > Celery - 4.1.0 > Flask-RESTful - 0.3.6 > Flask-SQLAlchemy

Re: Create a contact book

2021-10-26 Thread Lars Liedtke
😂 > Here at Homeworks Anonymous, the first step is admitting that what you > have is a homework problem. :) > > ChrisA -- punkt.de GmbH Lars Liedtke .infrastructure Kaiserallee 13a 76133 Karlsruhe Tel. +49 721 9109 500 https://infrastructure.punkt.de i...@punkt.de AG Man

Re: Call julia from Python: which package?

2021-12-17 Thread Lars Liedtke
n/ > > Even if you go the Julia route, it's probably still best to profile your > Python code to identify the slow ("hot") spots, and rewrite only them. -- punkt.de GmbH Lars Liedtke .infrastructure Kaiserallee 13a 76133 Karlsruhe Tel. +49 721 9109 500 https

Re: Gunicorn - HTTP and HTTPS in the same instance?

2022-01-10 Thread Lars Liedtke
iddly little archive of an old mailing list running on a single-core Ubuntu VM somewhere on the East Coast. Speed is not a real requirement. Load balancing seemed like overkill to me. Still, I guess if it has to be, then it has to be. Skip -- punkt.de GmbH Lars Liedtke .infrastructure Kaiseralle

Re: Gunicorn - HTTP and HTTPS in the same instance?

2022-01-10 Thread Lars Liedtke
balancing seemed like overkill to me. Still, I guess if it has to be, then it has to be. Skip -- punkt.de GmbH Lars Liedtke .infrastructure Kaiserallee 13a 76133 Karlsruhe Tel. +49 721 9109 500 https://infrastructure.punkt.de i...@punkt.de AG Mannheim 108285 Geschäftsführer: Jürgen Egeling

Re: Why dict.setdefault() has value as optional?

2022-02-02 Thread Lars Liedtke
n the past, but I always specified a value. What's the use case of setting None by default? -- punkt.de GmbH Lars Liedtke .infrastructure Kaiserallee 13a 76133 Karlsruhe Tel. +49 721 9109 500 https://infrastructure.punkt.de i...@punkt.de AG Mannheim 108285 Geschäftsführer: Jürgen Egeling,

Re: Best way to check if there is internet?

2022-02-07 Thread Lars Liedtke
ly, that depends on what you need it to do. ChrisA -- https://mail.python.org/mailman/listinfo/python-list -- punkt.de GmbH Lars Liedtke .infrastructure Kaiserallee 13a 76133 Karlsruhe Tel. +49 721 9109 500 https://infrastructure.punkt.de i...@punkt.de AG Mannheim 108285 Geschäftsführer: Jü

Re: Best way to check if there is internet?

2022-02-07 Thread Lars Liedtke
P.S.: for ping a startingpoint can be icmplib, for dns dnspython and for http requests. But consider as well if you want to check for IPv4 and/or IPv6 Connectivity. Am 07.02.22 um 13:47 schrieb Lars Liedtke: Each Browser is doing it differently and even Windows or Linux-Desktopmanagers

How do you log in your projects?

2022-02-08 Thread Lars Liedtke
Cheers Lars -- punkt.de GmbH Lars Liedtke .infrastructure Kaiserallee 13a 76133 Karlsruhe Tel. +49 721 9109 500 https://infrastructure.punkt.de i...@punkt.de AG Mannheim 108285 Geschäftsführer: Jürgen Egeling, Daniel Lienert, Fabian Stein -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-14 Thread Lars Liedtke
Additionally, which datatype would you expect them to be returned in? One could argument for int or float (Decimal?),  both could be valid datatypes, depending on how exact you might want them, while the second is the time base of SI units. Cheers Lars -- Lars Liedtke Software Entwickler

Re: Best practices for using super()

2023-07-05 Thread Lars Liedtke via Python-list
Hey, When you have multiple inheritance and you e.g. want to explicitely call __init__ of one of the classes inherited from, that is not the first in the list of classes to inherit from. Cheers, Lars Lars Liedtke Senior Software Developer [Tel.] +49 721 98993- [Fax] +49 721 98993- [E

Re: pip-sync

2023-07-24 Thread Lars Liedtke via Python-list
This email contains a secure message that can be read by opening the attachment. Lars Liedtke Senior Software Developer [Tel.] [Fax] +49 721 98993- [E-Mail]l...@solute.de<mailto:l...@solute.de> solute gmbh Zeppelinstraße 15 76185 Karlsruhe Germany [Logo Solute] Mark

Re: pip-sync

2023-07-24 Thread Lars Liedtke via Python-list
Did maybe pip-sync create the venv with --system-site-packages (at least that's the commandline option for pip) I only saw behaviour like this so far, when my venv was with --system-site-packages and a package was installed by the system. Sorry for the first mess. Cheers Lars Lars Li

Re: Using a background thread with asyncio/futures with flask

2024-03-22 Thread Lars Liedtke via Python-list
Hey, As far as I know (might be old news) flask does not support asyncio. You would have to use a different framework, like e.g. FastAPI or similar. Maybe someone has already written "flask with asyncio" but I don't know about that. Cheers Lars Lars Liedtke Lead Developer

Re: Using a background thread with asyncio/futures with flask

2024-03-22 Thread Lars Liedtke via Python-list
Sorry, must have missed that :-/ Lars Liedtke Lead Developer [Tel.] +49 721 98993- [Fax] +49 721 98993- [E-Mail]l...@solute.de<mailto:l...@solute.de> solute GmbH Zeppelinstraße 15 76185 Karlsruhe Germany [Marken] Geschäftsführer | Managing Director: Dr. Thilo Gans,

Re: How to check whether audio bytes contain empty noise or actual voice/signal?

2024-10-28 Thread Lars Liedtke via Python-list
There are also the concepts of Cepstrum (https://en.wikipedia.org/wiki/Cepstrum) and Quefrency, which are derivatives of Spectrum and Frequency, with which you can even do speaker-recognition, but also detection of events. Lars Liedtke Lead Developer [Tel.] +49 721 98993- [Fax] +49 721