Re: Android APK

2023-01-25 Thread jacob kruger
Beeware is the only one I have tried out: https://beeware.org/ Jacob Kruger +2782 413 4791 "Resistance is futile...but, acceptance is versatile..." On 2023/01/25 22:55, Jules Tillinghast wrote: Is there a good python library for converting python3 to android APK --

Re: HTTP server benchmarking/load testing in Python

2023-01-25 Thread Dino
On 1/25/2023 3:27 PM, Dino wrote: On 1/25/2023 1:33 PM, orzodk wrote: I have used locust with success in the past. https://locust.io First impression, exactly what I need. Thank you Orzo! the more I learn about Locust and I tinker with it, the more I love it. Thanks again. --

Re: HTTP server benchmarking/load testing in Python

2023-01-25 Thread Thomas Passin
On 1/25/2023 8:36 PM, Chris Angelico wrote: On Thu, 26 Jan 2023 at 12:06, Thomas Passin wrote: On 1/25/2023 7:38 PM, Peter J. Holzer wrote: On 2023-01-25 16:30:56 -0500, Thomas Passin wrote: Great! Don't forget what I said about potential overheating if you hit the server with as many

RE: bool and int

2023-01-25 Thread avi.e.gross
Like Chris, I appreciate precision when it matters but since I am not writing a textbook here, I often talk more informally. There are many variations on now variables or objects are treated differently in certain languages and when I said "STRONG" I simply meant a sort of opposite to "WEAK". I

[Help Request] Embedding Python in a CPP Application Responsibly & Functionally

2023-01-25 Thread John McCardle
Greetings, I'm working on embedding a Python interpreter into a C++ application. My embedding example program is here, largely taken from Python docs: https://gist.github.com/jmccardle/f3f19d3753ae023aa52b927f0d181c43 I'm simply not interested in writing in Lua, so regardless of any

Re: How to make argparse accept "-4^2+5.3*abs(-2-1)/2" string argument?

2023-01-25 Thread Chris Angelico
On Thu, 26 Jan 2023 at 14:13, Jach Feng wrote: > Now I understand some oppose this idea and saying that you shouldn't use a > kitchen knife to cut a cake:-) You shouldn't use a chainsaw to cut a cake, and then ask us why cake-cutting is so noisy. ChrisA --

Re: bool and int

2023-01-25 Thread Python
On Wed, Jan 25, 2023 at 01:01:24PM +1100, Chris Angelico wrote: > On Wed, 25 Jan 2023 at 12:43, wrote: > > Python has a different philosophy than some other languages with strong > > typing. In some of those, you would not be allowed to add or multiply at > > random but would need to convert

Re: How to make argparse accept "-4^2+5.3*abs(-2-1)/2" string argument?

2023-01-25 Thread Jach Feng
Jach Feng 在 2023年1月22日 星期日上午11:11:22 [UTC+8] 的信中寫道: > Fail on command line, > > e:\Works\Python>py infix2postfix.py "-4^2+5.3*abs(-2-1)/2" > usage: infix2postfix.py [-h] [infix] > infix2postfix.py: error: unrecognized arguments: -4^2+5.3*abs(-2-1)/2 > > Also fail in REPL, > >

RE: bool and int

2023-01-25 Thread avi.e.gross
Chris, We generally agree albeit I have a question in python with the concept of being truthy that results in either a Boolean value that boils down to 0 and 1 but in some cases may boil down to the last evaluated argument which remains in a form that may not be either a Boolean or an integer. I

RE: bool and int

2023-01-25 Thread avi.e.gross
Dino, There is no such things as a "principle of least surprise" or if you insist there is, I can nominate many more such "rules" such as "the principle of get out of my way and let me do what I want!" Computer languages with too many rules are sometimes next to unusable in practical situations.

Re: HTTP server benchmarking/load testing in Python

2023-01-25 Thread Chris Angelico
On Thu, 26 Jan 2023 at 12:06, Thomas Passin wrote: > > On 1/25/2023 7:38 PM, Peter J. Holzer wrote: > > On 2023-01-25 16:30:56 -0500, Thomas Passin wrote: > >> Great! Don't forget what I said about potential overheating if you > >> hit the server with as many requests as it can handle. > > > >

Re: HTTP server benchmarking/load testing in Python

2023-01-25 Thread Thomas Passin
On 1/25/2023 7:38 PM, Peter J. Holzer wrote: On 2023-01-25 16:30:56 -0500, Thomas Passin wrote: Great! Don't forget what I said about potential overheating if you hit the server with as many requests as it can handle. Frankly, if you can overheat a server by hitting it with HTTP requests,

Re: Android APK

2023-01-25 Thread Skip Montanaro
> > Is there a good python library for converting python3 to android APK > I'm not an app type of person, so don't watch that space. I've heard of Kivy: https://kivy.org/ I also something called python-for-android on PyPI with a recent release: https://pypi.org/project/python-for-android/ I'd

Re: HTTP server benchmarking/load testing in Python

2023-01-25 Thread Peter J. Holzer
On 2023-01-25 16:30:56 -0500, Thomas Passin wrote: > Great! Don't forget what I said about potential overheating if you > hit the server with as many requests as it can handle. Frankly, if you can overheat a server by hitting it with HTTP requests, get better hardware and/or put it into a place

Re: How to make argparse accept "-4^2+5.3*abs(-2-1)/2" string argument?

2023-01-25 Thread David
On Thu, 26 Jan 2023 at 04:24, Jach Feng wrote: > Chris Angelico 在 2023年1月25日 星期三下午1:16:25 [UTC+8] 的信中寫道: > > On Wed, 25 Jan 2023 at 14:42, Jach Feng wrote: > > You're still not really using argparse as an argument parser. Why not > > just do your own -h checking? Stop trying to use argparse for

Re: bool and int

2023-01-25 Thread Chris Angelico
On Thu, 26 Jan 2023 at 08:19, Dino wrote: > > On 1/23/2023 11:22 PM, Dino wrote: > > >>> b = True > > >>> isinstance(b,bool) > > True > > >>> isinstance(b,int) > > True > > >>> > > ok, I read everything you guys wrote. Everyone's got their reasons > obviously, but allow me to observe that

Re: HTTP server benchmarking/load testing in Python

2023-01-25 Thread Thomas Passin
On 1/25/2023 3:29 PM, Dino wrote: On 1/25/2023 1:21 PM, Thomas Passin wrote: I actually have a Python program that does exactly this. Thank you, Thomas. I'll check out Locust, mentioned by Orzodk, as it looks like a mature library that appears to do exactly what I was hoping. Great!

Android APK

2023-01-25 Thread Jules Tillinghast
Is there a good python library for converting python3 to android APK -- Please consider the environment before printing this email.Remember when writing or responding to email, the Massachusetts Secretary of State has determined that e-mail is a public record. All electronic messages sent

Re: HTTP server benchmarking/load testing in Python

2023-01-25 Thread Dino
On 1/25/2023 1:21 PM, Thomas Passin wrote: I actually have a Python program that does exactly this. Thank you, Thomas. I'll check out Locust, mentioned by Orzodk, as it looks like a mature library that appears to do exactly what I was hoping. --

Re: HTTP server benchmarking/load testing in Python

2023-01-25 Thread Dino
On 1/25/2023 1:33 PM, orzodk wrote: I have used locust with success in the past. https://locust.io First impression, exactly what I need. Thank you Orzo! -- https://mail.python.org/mailman/listinfo/python-list

Re: bool and int

2023-01-25 Thread Dino
On 1/23/2023 11:22 PM, Dino wrote: >>> b = True >>> isinstance(b,bool) True >>> isinstance(b,int) True >>> ok, I read everything you guys wrote. Everyone's got their reasons obviously, but allow me to observe that there's also something called "principle of least surprise". In my case,

Re: Languages working together

2023-01-25 Thread Thomas Passin
On 1/25/2023 2:21 PM, avi.e.gr...@gmail.com wrote: [...] Sharing can come at many levels. I am fairly certain many very different languages may still share libraries written ages ago and written in C or FORTRAN and thus external to other languages and just need some way to interface to them.

Re: Evaluation of variable as f-string

2023-01-25 Thread Thomas Passin
On 1/25/2023 1:26 PM, Antoon Pardon wrote: Op 23/01/2023 om 17:24 schreef Johannes Bauer: Hi there, is there an easy way to evaluate a string stored in a variable as if it were an f-string at runtime? I.e., what I want is to be able to do this: x = { "y": "z" } print(f"-> {x['y']}") This

Languages working together

2023-01-25 Thread avi.e.gross
Thomas, I changed the subject line as we are not talking about bool and int anymore. For me, there are several sides to JAVA that go beyond the "language" to the JVM, or Java Virtual Machine. What you are describing is an example of interoperability you can get if your language also is built on

Re: bool and int

2023-01-25 Thread Dennis Lee Bieber
On Tue, 24 Jan 2023 20:16:31 -0500, Mike Baskin declaimed the following: >Will all of you please stop sending me emails > Nobody is sending "you" emails deliberately (unless they have a poorly [to me] set up client that sends to the list AND the person who wrote the message they replied

Re: HTTP server benchmarking/load testing in Python

2023-01-25 Thread orzodk
Dino writes: > Hello, I could use something like Apache ab in Python ( > https://httpd.apache.org/docs/2.4/programs/ab.html ). > > The reason why ab doesn't quite cut it for me is that I need to define > a pool of HTTP requests and I want the tool to run those (as opposed > to running the same

Re: Evaluation of variable as f-string

2023-01-25 Thread Antoon Pardon
Op 23/01/2023 om 17:24 schreef Johannes Bauer: Hi there, is there an easy way to evaluate a string stored in a variable as if it were an f-string at runtime? I.e., what I want is to be able to do this: x = { "y": "z" } print(f"-> {x['y']}") This prints "-> z", as expected. But consider: x

Re: HTTP server benchmarking/load testing in Python

2023-01-25 Thread Thomas Passin
On 1/25/2023 10:53 AM, Dino wrote: Hello, I could use something like Apache ab in Python ( https://httpd.apache.org/docs/2.4/programs/ab.html ). The reason why ab doesn't quite cut it for me is that I need to define a pool of HTTP requests and I want the tool to run those (as opposed to

Re: How to make argparse accept "-4^2+5.3*abs(-2-1)/2" string argument?

2023-01-25 Thread Weatherby,Gerard
Use a different prefix character parser = argparse.ArgumentParser(prefix_chars='%') parser.add_argument('expression') args = parser.parse_args() print(args.expression) argparser is for allowing multiple command line options to be passed, providing default, controlling the

Re: How to make argparse accept "-4^2+5.3*abs(-2-1)/2" string argument?

2023-01-25 Thread Chris Angelico
On Thu, 26 Jan 2023 at 04:25, Jach Feng wrote: > > Chris Angelico 在 2023年1月25日 星期三下午1:16:25 [UTC+8] 的信中寫道: > > On Wed, 25 Jan 2023 at 14:42, Jach Feng wrote: > > > I was happy working with argparse during implement my script. To save the > > > typing, I used a default equation for testing. > >

HTTP server benchmarking/load testing in Python

2023-01-25 Thread Dino
Hello, I could use something like Apache ab in Python ( https://httpd.apache.org/docs/2.4/programs/ab.html ). The reason why ab doesn't quite cut it for me is that I need to define a pool of HTTP requests and I want the tool to run those (as opposed to running the same request over and

Re: How to make argparse accept "-4^2+5.3*abs(-2-1)/2" string argument?

2023-01-25 Thread Jach Feng
Chris Angelico 在 2023年1月25日 星期三下午1:16:25 [UTC+8] 的信中寫道: > On Wed, 25 Jan 2023 at 14:42, Jach Feng wrote: > > I was happy working with argparse during implement my script. To save the > > typing, I used a default equation for testing. > > > > sample = "-4^2+5.3*abs(-2-1)/2, abs(Abc)*(B+C)/D,

Re: bool and int

2023-01-25 Thread rbowman
On Wed, 25 Jan 2023 06:53:44 -0500, 2QdxY4RzWzUUiLuE wrote: > They used Java at my last job (as in, the last job I had before I > retired), and it was absolutely awful, for any number of reasons, the > gymnastics (on many levels) required to support "primitive types" being > one of them. My

Re: bool and int

2023-01-25 Thread Chris Angelico
On Thu, 26 Jan 2023 at 03:19, <2qdxy4rzwzuui...@potatochowder.com> wrote: > > Strongly disagree. There is PLENTY of practical value in using > > booleans as numbers. This is nothing to do with counting bytes, and > > everything to do with how useful it is in practice. > > IMO, the difference in

Re: bool and int

2023-01-25 Thread 2QdxY4RzWzUUiLuE
On 2023-01-25 at 23:11:37 +1100, Chris Angelico wrote: > On Wed, 25 Jan 2023 at 22:55, <2qdxy4rzwzuui...@potatochowder.com> wrote: > > So, I think what you're trying to say is that you prefer the razor sharp > > quality of truthiness to the zen of explicit being better than implicit. > > Not

Re: bool and int

2023-01-25 Thread Thomas Passin
On 1/25/2023 6:53 AM, 2qdxy4rzwzuui...@potatochowder.com wrote: They used Java at my last job (as in, the last job I had before I retired), and it was absolutely awful, for any number of reasons, the gymnastics (on many levels) required to support "primitive types" being one of them. In my one

Re: bool and int

2023-01-25 Thread Chris Angelico
On Wed, 25 Jan 2023 at 22:55, <2qdxy4rzwzuui...@potatochowder.com> wrote: > > On 2023-01-25 at 12:14:50 +1100, > Chris Angelico wrote: > > > On Wed, 25 Jan 2023 at 10:32, <2qdxy4rzwzuui...@potatochowder.com> wrote: > > > > The usual complaint is that some people write FORTRAN no matter what > > >

Re: bool and int

2023-01-25 Thread 2QdxY4RzWzUUiLuE
On 2023-01-25 at 12:14:50 +1100, Chris Angelico wrote: > On Wed, 25 Jan 2023 at 10:32, <2qdxy4rzwzuui...@potatochowder.com> wrote: > > The usual complaint is that some people write FORTRAN no matter what > > language they're actually using. Are you writing Python in C#? ;-) > But the way I