Re: Formatted Output and Argument Parsing (was: Re: Flubbed it in the second interation through the string: range error... HOW?)

2024-05-29 Thread Chris Angelico via Python-list
On Wed, 29 May 2024 at 23:06, Dan Sommers via Python-list wrote: > (For the history-impaired, getopt existed long before Python and will > likely exist long after it, but getopt's "replacement" optparse lasted > only from 2003 until 2011.) Depends on your definition of "lasted". It's not getting

Formatted Output and Argument Parsing (was: Re: Flubbed it in the second interation through the string: range error... HOW?)

2024-05-29 Thread Dan Sommers via Python-list
> 2015, so they're hardly chronologically special), but because most of > this looks like debugging output that can take advantage of this > feature: > > print(f"if block {name[index]=} {index=}") defsnark: After years of getopt (and even more, if you include non-Pyt

Re: Can one output something other than 'nan' for not a number values?

2024-02-19 Thread dn via Python-list
On 20/02/24 01:04, Chris Green via Python-list wrote: dn wrote: On 18/02/24 09:53, Grant Edwards via Python-list wrote: On 2024-02-17, Cameron Simpson via Python-list wrote: On 16Feb2024 22:12, Chris Green wrote: I'm looking for a simple way to make NaN values output as something

Re: Can one output something other than 'nan' for not a number values?

2024-02-19 Thread dn via Python-list
On 20/02/24 05:58, Grant Edwards via Python-list wrote: Here's a demonstration of how to hook custom code into the f-string formatting engine. It's brilliantly depraved. https://stackoverflow.com/questions/55876683/hook-into-the-builtin-python-f-string-format-machinery From the above: Yo

Re: Can one output something other than 'nan' for not a number values?

2024-02-19 Thread Grant Edwards via Python-list
On 2024-02-19, Chris Green via Python-list wrote: > It's using f'{...}' at the moment. Here's a demonstration of how to hook custom code into the f-string formatting engine. It's brilliantly depraved. https://stackoverflow.com/questions/55876683/hook-into-the-builtin-python-f-string-format-mach

Re: Can one output something other than 'nan' for not a number values?

2024-02-19 Thread Chris Green via Python-list
Grant Edwards wrote: > On 2024-02-16, Chris Green via Python-list wrote: > > > I'm looking for a simple way to make NaN values output as something > > like '-' or even just a space instead of the string 'nan'. > > It would probably help if yo

Re: Can one output something other than 'nan' for not a number values?

2024-02-19 Thread Chris Green via Python-list
dn wrote: > On 18/02/24 09:53, Grant Edwards via Python-list wrote: > > On 2024-02-17, Cameron Simpson via Python-list > > wrote: > >> On 16Feb2024 22:12, Chris Green wrote: > >>> I'm looking for a simple way to make NaN values output as something >

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread dn via Python-list
On 18/02/24 09:53, Grant Edwards via Python-list wrote: On 2024-02-17, Cameron Simpson via Python-list wrote: On 16Feb2024 22:12, Chris Green wrote: I'm looking for a simple way to make NaN values output as something like '-' or even just a space instead of

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Chris Angelico via Python-list
On Mon, 19 Feb 2024 at 06:47, Grant Edwards via Python-list wrote: > I would be tempted to try monkey-patching the float class to override > the __format__ method. I have no idea what side effects that might > have, or if it's even used by the various formatting mechanisms, so > you might end up s

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Piergiorgio Sartor via Python-list
On 16/02/2024 23.12, Chris Green wrote: I'm looking for a simple way to make NaN values output as something like '-' or even just a space instead of the string 'nan'. This would then make it much easier to handle outputting values from sensors when not all sensors are

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Grant Edwards via Python-list
On 2024-02-16, Chris Green wrote: > I'm looking for a simple way to make NaN values output as something > like '-' or even just a space instead of the string 'nan'. I tried monkey-patching the __format__ method of float, but it's immutable, so that didnt

Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Grant Edwards via Python-list
[I've been trying all afternoon to post via slrn, but nothing is showing up on the list. Forgive me if multiple posts eventually show up.] On 2024-02-17, Cameron Simpson via Python-list wrote: > On 16Feb2024 22:12, Chris Green wrote: >>I'm looking for a simple way to make N

Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Grant Edwards via Python-list
[Posts via slrn and my GMail account aren't showing up, so I guess I'll try subscribing from a different e-mail address.] On 2024-02-17, Cameron Simpson via Python-list wrote: On 16Feb2024 22:12, Chris Green wrote: I'm looking for a simple way to make NaN values output as

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Grant Edwards via Python-list
On 2024-02-17, Cameron Simpson via Python-list wrote: > On 16Feb2024 22:12, Chris Green wrote: >>I'm looking for a simple way to make NaN values output as something >>like '-' or even just a space instead of the string 'nan'. [...] >> >>

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Grant Edwards via Python-list
On 2024-02-17, Cameron Simpson via Python-list wrote: > On 16Feb2024 22:12, Chris Green wrote: >>I'm looking for a simple way to make NaN values output as something >>like '-' or even just a space instead of the string 'nan'. [...] >> >>

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Grant Edwards via Python-list
On 2024-02-17, Cameron Simpson via Python-list wrote: > On 16Feb2024 22:12, Chris Green wrote: >>I'm looking for a simple way to make NaN values output as something >>like '-' or even just a space instead of the string 'nan'. [...] >> >>

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Grant Edwards via Python-list
On 2024-02-17, Cameron Simpson via Python-list wrote: > On 16Feb2024 22:12, Chris Green wrote: >>I'm looking for a simple way to make NaN values output as something >>like '-' or even just a space instead of the string 'nan'. >>[...] >> >&

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Grant Edwards via Python-list
On 2024-02-16, Chris Green via Python-list wrote: > I'm looking for a simple way to make NaN values output as something > like '-' or even just a space instead of the string 'nan'. It would probably help if you told us how you're "outputting" them

Re: Can one output something other than 'nan' for not a number values?

2024-02-16 Thread Cameron Simpson via Python-list
On 16Feb2024 22:12, Chris Green wrote: I'm looking for a simple way to make NaN values output as something like '-' or even just a space instead of the string 'nan'. This would then make it much easier to handle outputting values from sensors when not all sensors are

Can one output something other than 'nan' for not a number values?

2024-02-16 Thread Chris Green via Python-list
I'm looking for a simple way to make NaN values output as something like '-' or even just a space instead of the string 'nan'. This would then make it much easier to handle outputting values from sensors when not all sensors are present. So, for example, my battery m

Re: No solution for "--verbose" (on stdout) output in Pythonds standard library?

2023-01-04 Thread Richard Damon
> On Jan 4, 2023, at 8:56 AM, c.bu...@posteo.jp wrote: > > Hello, > > first I have to say that in my current and fresh humble opinion the > often seen "--verbose" switch in command line applications should > affect only the messages given to the users. This means messages on > "stdout". That is

Re: No solution for "--verbose" (on stdout) output in Pythonds standard library?

2023-01-04 Thread Eryk Sun
On 1/4/23, c.bu...@posteo.jp wrote: > > often seen "--verbose" switch in command line applications should > affect only the messages given to the users. This means messages on > "stdout". That is what this question is about. Is this additional context information such as help and definitions? If

Re: No solution for "--verbose" (on stdout) output in Pythonds standard library?

2023-01-04 Thread Weatherby,Gerard
ser.parse_args() logger = logging.getLogger(__name__) logger.setLevel(getattr(logging,args.loglevel)) From: Python-list on behalf of c.bu...@posteo.jp Date: Wednesday, January 4, 2023 at 8:55 AM To: python-list@python.org Subject: No solution for "--verbose" (on stdout) output in Pythonds sta

Re: No solution for "--verbose" (on stdout) output in Pythonds standard library?

2023-01-04 Thread Chris Angelico
On Thu, 5 Jan 2023 at 00:54, wrote: > > Hello, > > first I have to say that in my current and fresh humble opinion the > often seen "--verbose" switch in command line applications should > affect only the messages given to the users. This means messages on > "stdout". That is what this question is

No solution for "--verbose" (on stdout) output in Pythonds standard library?

2023-01-04 Thread c.buhtz
Hello, first I have to say that in my current and fresh humble opinion the often seen "--verbose" switch in command line applications should affect only the messages given to the users. This means messages on "stdout". That is what this question is about. The logging module is not an option becau

Re: pygame.midi input/output not working

2022-12-22 Thread Thomas Passin
This issue thread on Github says that everyone is waiting on the packaging maintainer, but nothing from him for some time. On 12/22/2022 5:04 AM, Peter J. Holzer wrote: On 2022-12-21 17:23:47 -0500, Thomas Passin wrote: The pygame web site says this: "Pygame still does not run on Python 3.11"

Re: pygame.midi input/output not working

2022-12-22 Thread Weatherby,Gerard
https://github.com/pygame/pygame/issues/3522 From: Python-list on behalf of Peter J. Holzer Date: Thursday, December 22, 2022 at 5:06 AM To: python-list@python.org Subject: Re: pygame.midi input/output not working On 2022-12-21 17:23:47 -0500, Thomas Passin wrote: > The pygame web site s

Re: pygame.midi input/output not working

2022-12-22 Thread Peter J. Holzer
On 2022-12-21 17:23:47 -0500, Thomas Passin wrote: > The pygame web site says this: > > "Pygame still does not run on Python 3.11" This doesn't sound like "we haven't got around to preparing packages yet" and more like "there's a serious incompatibility we haven't solved yet". Does anybody know

Fwd: pygame.midi input/output not working

2022-12-21 Thread Patrick EGLOFF
Hi Thomas, Thanks for the answer AND solution ! That was it... shame on me, I didn't notice this warning. I uninstalled 3.11.1 and installed 3.10.9, and my software is back to live ! Now I have to figure out another problem. I will make another post about this serial weird behavior. Thanks for

Re: pygame.midi input/output not working

2022-12-21 Thread Thomas Passin
On 12/21/2022 4:32 PM, Patrick EGLOFF wrote: HI, Some time ago I wrote a small software using pygame.midi It worked just fine with Win10/ python 3.9 / SDL 2.0.14 / pygame 2.0.1 I had to change my computer and now I installed Win10 / Python 3.11.1 / SDL 2.0.18 / pygame 2.1.2 The following instru

pygame.midi input/output not working

2022-12-21 Thread Patrick EGLOFF
HI, Some time ago I wrote a small software using pygame.midi It worked just fine with Win10/ python 3.9 / SDL 2.0.14 / pygame 2.0.1 I had to change my computer and now I installed Win10 / Python 3.11.1 / SDL 2.0.18 / pygame 2.1.2 The following instructions don't work anymore, making the IDE stop

Re: Python 3.7+ cannot print unicode characters when output is redirected to file - is this a bug?

2022-11-13 Thread Eryk Sun
gacy read from the console host does not support reading non-ASCII text as UTF-8. For example: >>> os.read(0, 6) SPĀM b'SP\x00M\r\n' This is a trivial bug in the console host, which stems from the fact that UTF-8 is a multibyte encoding (1-4 bytes per code), but for s

Re: Python 3.7+ cannot print unicode characters when output is redirected to file - is this a bug?

2022-11-13 Thread Thomas Passin
On 11/13/2022 9:49 AM, Jessica Smith wrote: Consider the following code ran in Powershell or cmd.exe: $ python -c "print('└')" └ $ python -c "print('└')" > test_file.txt Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python38\lib\encodings\cp1252.py", line

Re: Python 3.7+ cannot print unicode characters when output is redirected to file - is this a bug?

2022-11-13 Thread Barry
> On 13 Nov 2022, at 14:52, Jessica Smith <12jessicasmit...@gmail.com> wrote: > > Consider the following code ran in Powershell or cmd.exe: > > $ python -c "print('└')" > └ > > $ python -c "print('└')" > test_file.txt > Traceback (most recent call last): > File "", line 1, in > File "C:\Pr

Python 3.7+ cannot print unicode characters when output is redirected to file - is this a bug?

2022-11-13 Thread Jessica Smith
Consider the following code ran in Powershell or cmd.exe: $ python -c "print('└')" └ $ python -c "print('└')" > test_file.txt Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python38\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(i

Re: What is the reason from different output generate using logical 'and' and 'or' operator in Python 3.10.8

2022-11-11 Thread Exam Guide Publishers
On Tuesday, 8 November 2022 at 05:36:49 UTC+5:30, David wrote: > On Tue, 8 Nov 2022 at 03:08, ICT Ezy wrote: > > > Please explain how to generate different output in following logical > > operations > > > >>> 0 and True > > 0 > > >&

Re: What is the reason from different output generate using logical 'and' and 'or' operator in Python 3.10.8

2022-11-07 Thread David
On Tue, 8 Nov 2022 at 03:08, ICT Ezy wrote: > Please explain how to generate different output in following logical > operations > >>> 0 and True > 0 > >>> 0 or True > True > >>> 1 and True > True > >>> 1 or True > 1 Hi, T

What is the reason from different output generate using logical 'and' and 'or' operator in Python 3.10.8

2022-11-07 Thread ICT Ezy
Please explain how to generate different output in following logical operations >>> 0 and True 0 >>> 0 or True True >>> 1 and True True >>> 1 or True 1 -- https://mail.python.org/mailman/listinfo/python-list

Fwd: [pandas-dev/pandas] BUG: I CANT TO RECIEVING OUTPUT FROM DATAFRAME (Issue #48256)

2022-08-25 Thread נתי שטרן
הודעה שהועברה -- מאת: *נתי שטרן* תאריך: יום שישי, 26 באוגוסט 2022 נושא: Re: [pandas-dev/pandas] BUG: I CANT TO RECIEVING OUTPUT FROM DATAFRAME (Issue #48256) אל: pandas-dev/pandas < reply+abnbjwpfil765hhzxpb3l4wbcubnzevbnhhfbdb...@reply.github.com> עותק: pandas-dev/

Re: [CrowdStrike/falconpy] Why I recieved this output: (Discussion #760)

2022-08-25 Thread נתי שטרן
בתאריך יום חמישי, 25 באוגוסט 2022, מאת Joshua Hiller < notificati...@github.com>: > Hi @NSH531 - > > If passing an index doesn't help, you can probably get more assistance > from the Pandas issue board located here: https://github.com/pandas-dev/ > pandas/issues > > — >

Re: [CrowdStrike/falconpy] Why I recieved this output: (Discussion #760)+pandas DataFrame error

2022-08-25 Thread נתי שטרן
2022-08-25 17:53 GMT‎+03:00‎, נתי שטרן : > Someone here is understanding at pandas? > > בתאריך יום חמישי, 25 באוגוסט 2022, מאת Joshua Hiller < > notificati...@github.com>: > >> This is pretty far out of scope, but reviewing the error message in your >> IDE it appears you are passing scalars to the

Re: [CrowdStrike/falconpy] Why I recieved this output: (Discussion #760)+pandas DataFrame error

2022-08-25 Thread נתי שטרן
Someone here is understanding at pandas? בתאריך יום חמישי, 25 באוגוסט 2022, מאת Joshua Hiller < notificati...@github.com>: > This is pretty far out of scope, but reviewing the error message in your > IDE it appears you are passing scalars to the Dataframe. Since there is no > index, you're given

Re: A beginning beginner's question about input, output and . . .

2021-01-16 Thread Terry Reedy
On 1/16/2021 9:17 PM, 2qdxy4rzwzuui...@potatochowder.com wrote: A bare minimum skeleton might look something like this: with open(filename) as f: for line in f.readlines(): handle_one_line(f) f.readlines() reads the entire file into a list of lines (strings). If y

Re: A beginning beginner's question about input, output and . . .

2021-01-16 Thread 2QdxY4RzWzUUiLuE
On 2021-01-16 at 17:46:13 -0500, DonK wrote: > On Sat, 16 Jan 2021 14:56:37 -0600, 2qdxy4rzwzuui...@potatochowder.com > wrote: > > >On 2021-01-16 at 15:42:44 -0500, > >DonK wrote: > >> For example, I've found a need to parse text documents quite a number > >> of times over the years. Basic/VB

Re: A beginning beginner's question about input, output and . . .

2021-01-16 Thread DonK
On Sat, 16 Jan 2021 14:56:37 -0600, 2qdxy4rzwzuui...@potatochowder.com wrote: >On 2021-01-16 at 15:42:44 -0500, >DonK wrote: > >> Yes, Windows. Iterating open windows with the Window's API is easy the >> hard (very hard) part is sending keystrokes to those windows to Save >> them. It's very trick

Re: A beginning beginner's question about input, output and . . .

2021-01-16 Thread DonK
On Tue, 12 Jan 2021 10:16:47 +0400, Abdur-Rahmaan Janhangeer wrote: >Greetings, > >Web with Python is really easy to get started with, here >is a simple endpoint with a framework called Flask > >from flask import Flask >app = Flask(__name__) > >@app.route('/') >def hello_world(): > return 'Hell

Re: A beginning beginner's question about input, output and . . .

2021-01-16 Thread 2QdxY4RzWzUUiLuE
On 2021-01-16 at 15:42:44 -0500, DonK wrote: > Yes, Windows. Iterating open windows with the Window's API is easy the > hard (very hard) part is sending keystrokes to those windows to Save > them. It's very tricky because the timing is critical. > > You have to use one of those "spy" utilities

Re: A beginning beginner's question about input, output and . . .

2021-01-16 Thread DonK
On Mon, 11 Jan 2021 21:56:48 -0800, Paul Rubin wrote: >DonK writes: >> My problem is that I don't understand how Python programs are >> used. (i.e user input and output) Is Python mainly used for backends? >> I've seen some Python gui frameworks like Tkinter,

Re: A beginning beginner's question about input, output and . . .

2021-01-16 Thread DonK
On Tue, 12 Jan 2021 09:26:18 +1100, Chris Angelico wrote: >On Tue, Jan 12, 2021 at 7:41 AM DonK wrote: >> Hi, I'm thinking about learning Python but I'm 74 years old and will >> very likely not ever have a programming job again. I used to program >> in Visual Basic, C\C++, Delphi, etc. and some

Re: conceptual problem (was: A beginning beginner's question about input, output and . . .

2021-01-14 Thread Greg Ewing
On 14/01/21 11:49 am, Cameron Simpson wrote: The "pure" OOP approach, where method calls are used as messages to set or fetch aspects of the object, is usually does with getter and setter methods like: x = o.getX() o.setX(9) People use get and set methods, not because it's somehow mo

Re: A beginning beginner's question about input, output and . . .

2021-01-14 Thread Peter Pearson
On Wed, 13 Jan 2021 21:46:08 - (UTC), Grant Edwards wrote: > On 2021-01-13, Peter Pearson wrote: [snip] >> Browsergui is not widely popular (I don't think anybody but me has >> mentioned it on this newsgroup), but it was written to be simple and >> Pythonic, and has served me well. Browsergui

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Greg Ewing
On 14/01/21 11:09 am, Grant Edwards wrote: Perhaps I need to recalibrate my adjectives, but with 256KB+ of flash and 32KB+ of RAM, I wouldn't call them "small" It's small by today's standards, when you consider that multiple GB of RAM is commonplace now in most "real" computers. -- Greg -- htt

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Greg Ewing
On 13/01/21 7:57 pm, Christian Gollwitzer wrote:  What do you mean, "until" ? https://medium.com/@yon.goldschmidt/running-python-in-the-linux-kernel-7cbcbd44503c He's using Micropython. That's cheating! :-) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: FridayFinking - Was: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Rich Shepard
On Thu, 14 Jan 2021, dn via Python-list wrote: Concerning the definition of "old" - when I'm having a 'good day', it's anyone several years my senior (and above) - when I'm creaking and groaning, it's anyone remotely my age, and older. About 45 years ago a 25-year-older friend of mine offered

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Grant Edwards
On 2021-01-13, Peter Pearson wrote: > On Mon, 11 Jan 2021 15:37:58 -0500, DonK > wrote: > [snip] >> >> I've seen some Python gui frameworks like Tkinter, PyQt, etc. but they >> look kinda like adding a family room onto a 1986 double wide mobile >> home, > > Agreed. > > Browsergui is not widely

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Grant Edwards
On 2021-01-13, Dennis Lee Bieber wrote: > On Tue, 12 Jan 2021 15:18:05 - (UTC), Grant Edwards > declaimed the following: >>On 2021-01-12, songbird wrote: >> >>> it can be used for pretty much anything except perhaps high >>> pressure real time things, but i bet someone else will know that >>>

FridayFinking - Was: A beginning beginner's question about input, output and . . .

2021-01-13 Thread dn via Python-list
On 14/01/2021 04.54, Grimble wrote: > On 11/01/2021 20:37, DonK wrote: >> >> Hi, I'm thinking about learning Python but I'm 74 years old and will >> very likely not ever have a programming job again. > At 83, I have no intention of having a programming job again! I last > coded something professi

Re: conceptual problem (was: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Cameron Simpson
On 13Jan2021 10:37, songbird wrote: > my momentary conceptual problem is that to me OOP means >being able to encapsulate data structures and code from >other parts of the program, but to me it doesn't look like >that is how python is designed. this is probably a complete >aside to this whole thr

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Peter Pearson
On Mon, 11 Jan 2021 15:37:58 -0500, DonK wrote: [snip] > > I've seen some Python gui frameworks like Tkinter, PyQt, etc. but they > look kinda like adding a family room onto a 1986 double wide mobile > home, Agreed. Browsergui is not widely popular (I don't think anybody but me has mentioned it

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread songbird
Christian Gollwitzer wrote: > Am 13.01.21 um 06:24 schrieb Greg Ewing: >> On 13/01/21 4:18 am, Grant Edwards wrote: >> >>> AFAIK, Python can't be used to write device drivers for any popular OS >> >> At least not until some crazy person embeds Python in the >> Linux kernel... > > > What do you

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Grimble
ion interfacing with various 1Wire sensors transcribed from an initial Ruby application. My largest GUI application is a database of personal contacts with input and output of data via vCards and .csv files (with a lot of mentoring from an American Gtk user!) I find this a fascinating news group

conceptual problem (was: A beginning beginner's question about input, output and . . .

2021-01-13 Thread songbird
Chris Angelico wrote: ...projects that fade... > That's not really something Python can ever control, but I can say > with some confidence that the big libraries like Qt and GTK are going > to adapt, one way or another. And perhaps more importantly: Neither > input()/print() nor web applications is

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Grimble
Ruby application. My largest GUI application is a database of personal contacts with input and output of data via vCards and .csv files (with a lot of mentoring from an American Gtk user!) I find this a fascinating news group - shame there's been no updates to Friday Finking recently

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Christian Gollwitzer
Am 13.01.21 um 06:24 schrieb Greg Ewing: On 13/01/21 4:18 am, Grant Edwards wrote: AFAIK, Python can't be used to write device drivers for any popular OS At least not until some crazy person embeds Python in the Linux kernel... What do you mean, "until" ? https://medium.com/@yon.goldschm

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Greg Ewing
On 13/01/21 4:18 am, Grant Edwards wrote: AFAIK, Python can't be used to write device drivers for any popular OS At least not until some crazy person embeds Python in the Linux kernel... -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Grant Edwards
On 2021-01-12, Chris Angelico wrote: > * Command-line calculator - pressing Ctrl-Alt-P will open up a > terminal with Python, and that's the normal way that I do quick > calculations I do that a lot too. -- Grant -- https://mail.python.org/mailman/listinfo/python-list

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Cameron Simpson
On 12Jan2021 10:40, Michael F. Stemper wrote: >On 11/01/2021 14.37, DonK wrote: >>I've installed Python 3.7, the PyCharm IDE and watched some Youtube >>tutorials > >I would suggest that instead of watching tutorials, you open up your IDE >and start writing stuff. I would second that. Maybe this i

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Cameron Simpson
On 12Jan2021 15:18, Grant Edwards wrote: >On 2021-01-12, songbird wrote: >> it can be used for pretty much anything except perhaps >> high pressure real time things, but i bet someone else will >> know that is being done too, i've just not heard of it. :) > >AFAIK, Python can't be used to writ

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Chris Angelico
ration. The audio analysis output is in the form of a Lua script (a VLC extension); also I have Python scripts that generate SourcePawn code for CS:GO integration, and various other things. * Decoding and analyzing myriad formats of files, including Borderlands save files (now which character had th

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Grant Edwards
On 2021-01-12, Chris Angelico wrote: > On Wed, Jan 13, 2021 at 3:18 AM Grant Edwards > wrote: >> >> On 2021-01-12, songbird wrote: >> >> > it can be used for pretty much anything except perhaps >> > high pressure real time things, but i bet someone else will >> > know that is being done too,

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Michael F. Stemper
On 12/01/2021 10.40, Michael F. Stemper wrote: Modeling of electric power systems: - load behavior in response to conservation load reduction Sorry, that should have been "conservation voltage reduction". -- Michael F. Stemper Psalm 82:1-4 -- https://mail.python.org/mailman/listinfo/python-l

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread MRAB
On 2021-01-11 20:37, DonK wrote: [snip] So, what do you folks use Python for? Since we're sharing: - Personal information manager in the form of a tree of pages. Each page can have code associated with it which defines functions to call when shortcut keys are pressed, giving page-specifi

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Michael F. Stemper
On 11/01/2021 14.37, DonK wrote: I've installed Python 3.7, the PyCharm IDE and watched some Youtube tutorials I would suggest that instead of watching tutorials, you open up your IDE and start writing stuff. Get an introductory python book (I used the O'Reilly _Introducing Python_), start at

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Chris Angelico
On Wed, Jan 13, 2021 at 3:18 AM Grant Edwards wrote: > > On 2021-01-12, songbird wrote: > > > it can be used for pretty much anything except perhaps > > high pressure real time things, but i bet someone else will > > know that is being done too, i've just not heard of it. :) > > AFAIK, Python

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Grant Edwards
On 2021-01-12, songbird wrote: > it can be used for pretty much anything except perhaps > high pressure real time things, but i bet someone else will > know that is being done too, i've just not heard of it. :) AFAIK, Python can't be used to write device drivers for any popular OS (Linux, Uni

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Grant Edwards
On 2021-01-11, DonK wrote: > So, what do you folks use Python for? I mainly use it for writing command-line utilities. Many of them work on either Windows or Linux, but are mostly used on Linux: * Two-pass symbolic assembler and dissassembler for a proprietary communications controller. *

Re: A beginning beginner's question about input, output and . . .

2021-01-11 Thread Chris Angelico
On Tue, Jan 12, 2021 at 5:26 PM songbird wrote: > for python i just spend too much time fumbling around > and i don't really know what is current and if i'm using > something that will be kept up for the future or if the > project is going away or in a direction that i won't like > (both KDE and

Re: A beginning beginner's question about input, output and . . .

2021-01-11 Thread songbird
on 3.7, the PyCharm IDE and watched some Youtube > tutorials but it's been stretched out over about 1.5 years so I'll > probably need to go back to the beginning. My problem is that I don't > understand how Python programs are used. (i.e user input and output) > Is Pyth

Re: A beginning beginner's question about input, output and . . .

2021-01-11 Thread Abdur-Rahmaan Janhangeer
but it's been stretched out over about 1.5 years so I'll > probably need to go back to the beginning. My problem is that I don't > understand how Python programs are used. (i.e user input and output) > Is Python mainly used for backends? > > I've seen some Pyth

Re: A beginning beginner's question about input, output and . . .

2021-01-11 Thread Chris Angelico
work. On Linux, I'd just subprocess out to wmctrl and parse its output - way easier. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: A beginning beginner's question about input, output and . . .

2021-01-11 Thread Greg Ewing
On 12/01/21 9:37 am, DonK wrote: I've seen some Python gui frameworks like Tkinter, PyQt, etc. but they look kinda like adding a family room onto a 1986 double wide mobile home, and they look even more complicated than creating a GUI from scratch in C++ with a message loop, raising events . . .

Re: A beginning beginner's question about input, output and . . .

2021-01-11 Thread Cameron Simpson
On 11Jan2021 15:52, Dan Stromberg wrote: >On Mon, Jan 11, 2021 at 2:22 PM Cameron Simpson wrote: >> >I've seen some Python gui frameworks like Tkinter, PyQt, etc. but >> >they >> >look kinda like adding a family room onto a 1986 double wide mobile >> >home, and they look even more complicated th

Re: A beginning beginner's question about input, output and . . .

2021-01-11 Thread Dan Stromberg
On Mon, Jan 11, 2021 at 2:22 PM Cameron Simpson wrote: > >I've seen some Python gui frameworks like Tkinter, PyQt, etc. but they > >look kinda like adding a family room onto a 1986 double wide mobile > >home, and they look even more complicated than creating a GUI from > >scratch in C++ with a me

Re: A beginning beginner's question about input, output and . . .

2021-01-11 Thread Chris Angelico
On Tue, Jan 12, 2021 at 7:41 AM DonK wrote: > Hi, I'm thinking about learning Python but I'm 74 years old and will > very likely not ever have a programming job again. I used to program > in Visual Basic, C\C++, Delphi, etc. and some obscure "mainframe" > languages. BTW, from my experience, there

Re: A beginning beginner's question about input, output and . . .

2021-01-11 Thread Cameron Simpson
back to the beginning. My problem is that I don't >understand how Python programs are used. (i.e user input and output) >Is Python mainly used for backends? My personal Python use is almost all backend, and on a personal basis I spend most of my time at a command prompt in a terminal

Re: A beginning beginner's question about input, output and . . .

2021-01-11 Thread dn via Python-list
stretched out over about 1.5 years so I'll > probably need to go back to the beginning. My problem is that I don't > understand how Python programs are used. (i.e user input and output) > Is Python mainly used for backends? > > I've seen some Python gui frameworks lik

Re: A beginning beginner's question about input, output and . . .

2021-01-11 Thread Chris Angelico
but it's been stretched out over about 1.5 years so I'll > probably need to go back to the beginning. My problem is that I don't > understand how Python programs are used. (i.e user input and output) > Is Python mainly used for backends? > Python is used in many different wa

A beginning beginner's question about input, output and . . .

2021-01-11 Thread DonK
to the beginning. My problem is that I don't understand how Python programs are used. (i.e user input and output) Is Python mainly used for backends? I've seen some Python gui frameworks like Tkinter, PyQt, etc. but they look kinda like adding a family room onto a 1986 double wide mobile home,

Re: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

2020-10-31 Thread Mats Wichmann
On 10/30/20 1:38 PM, Gian_Xatzak. wrote: >When I tried to download  matplotlib, it show me that message in the end: > >  > >ERROR: Command errored out with exit status 1: python setup.py egg_info >Check the logs for full command output. > >  &g

Re: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

2020-10-30 Thread Chris Angelico
On Sat, Oct 31, 2020 at 6:39 AM Gian_Xatzak. wrote: > >When I tried to download matplotlib, it show me that message in the end: > > > >ERROR: Command errored out with exit status 1: python setup.py egg_info >Check the logs for full command output. > Did

Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

2020-10-30 Thread Gian_Xatzak .
When I tried to download  matplotlib, it show me that message in the end:   ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.   *I have Windows 10, Python3.8.6(64bit)     Sent from [1]Mail for Windows

Re: Didn't understand the output of the following Python 3 code with reduce function?

2020-08-29 Thread Shivlal Sharma
On Saturday, 29 August 2020 at 02:47:56 UTC+5:30, Ben Bacarisse wrote: Thanks you all, I was really confused in this code. > Shivlal Sharma writes: > > > I have seen this code on one of competative programming site but I > > didn't get it, Why output is 9? > &g

Re: Didn't understand the output of the following Python 3 code with reduce function?

2020-08-28 Thread Ben Bacarisse
Shivlal Sharma writes: > I have seen this code on one of competative programming site but I > didn't get it, Why output is 9? > > from functools import * > > def ADDS(a,b): > return a+1 > nums = [1, 2, 3, 4, 5, 6, 7, 8, 9] > add = reduce(ADDS, nums) > prin

Re: Didn't understand the output of the following Python 3 code with reduce function?

2020-08-28 Thread Peter Otten
Shivlal Sharma wrote: > I have seen this code on one of competative programming site but I didn't > get it, Why output is 9? > > from functools import * > > def ADDS(a,b): > return a+1 > nums = [1, 2, 3, 4, 5, 6, 7, 8, 9] > add = reduce(ADDS, nums) > pri

RE: Didn't understand the output of the following Python 3 code with reduce function?

2020-08-28 Thread David Raymond
that 3 gets fed back into ADDS(3, 4) which returns 4 ... ADDS(8, 9) which returns 9 > I have seen this code on one of competative programming site but I didn't get > it, Why output is 9? > > from functools import * > > def ADDS(a,b): > return a+1 > nums = [1, 2, 3,

Didn't understand the output of the following Python 3 code with reduce function?

2020-08-28 Thread Shivlal Sharma
I have seen this code on one of competative programming site but I didn't get it, Why output is 9? from functools import * def ADDS(a,b): return a+1 nums = [1, 2, 3, 4, 5, 6, 7, 8, 9] add = reduce(ADDS, nums) print(add) output: 9 -- https://mail.python.org/mailman/listinfo/python-list

Re: Output showing "None" in Terminal

2020-08-27 Thread Py Noob
er" at the end, after it has been calculated. > > --- Joseph S. > > -----Original Message- > From: Py Noob > Sent: Monday, August 24, 2020 9:12 AM > To: python-list@python.org > Subject: Output showing "None" in Terminal > > Hi! > > i'm new t

Re: Output showing "None" in Terminal

2020-08-26 Thread Terry Reedy
On 8/24/2020 4:41 PM, Calvin Spealman wrote: "None" is the default return value of all functions in Python. But, the interpreter is supposed to suppress it as a displayed result. In batch mode, expressions are not echoed. In interactive move, expression values other than None are echoed. Th

RE: Output showing "None" in Terminal

2020-08-25 Thread Schachner, Joseph
sage- From: Py Noob Sent: Monday, August 24, 2020 9:12 AM To: python-list@python.org Subject: Output showing "None" in Terminal Hi! i'm new to python and would like some help with something i was working on from a tutorial. I'm using VScode with 3.7.0 version on Wind

Re: Output showing "None" in Terminal

2020-08-25 Thread dn via Python-list
function? - if the two branches of the if statement each print a result, what is the purpose of the last line? - is the specification that the program computes (exactly) one result, or is it expected to repeat an input-calculate-output cycle? - by "terminal" are you referring to the on

  1   2   3   4   5   6   7   8   9   10   >