Re: How to write list of integers to file with struct.pack_into?

2023-10-03 Thread Roel Schroeven via Python-list
Jen Kris via Python-list schreef op 2/10/2023 om 17:06: My previous message just went up -- sorry for the mangled formatting.  Here it is properly formatted: I want to write a list of 64-bit integers to a binary file.  Every example I have seen in my research converts it to .txt, but I want

How to write list of integers to file with struct.pack_into?

2023-10-03 Thread Jen Kris via Python-list
My previous message just went up -- sorry for the mangled formatting.  Here it is properly formatted: I want to write a list of 64-bit integers to a binary file.  Every example I have seen in my research converts it to .txt, but I want it in binary.  I wrote this code, based on some earlier

Re: How to write list of integers to file with struct.pack_into?

2023-10-02 Thread Jen Kris via Python-list
Dieter, thanks for your comment that: * In your code, `offset` is `0`, `1`, `2`, ... but it should be `0 *8`, `1 * 8`, `2 * 8`, ... But you concluded with essentially the same solution proposed by MRAB, so that would obviate the need to write item by item because it writes the whole buffer at

Re: How to write list of integers to file with struct.pack_into?

2023-10-02 Thread Dieter Maurer via Python-list
Jen Kris wrote at 2023-10-2 00:04 +0200: >Iwant to write a list of 64-bit integers to a binary file. Everyexample I >have seen in my research convertsit to .txt, but I want it in binary. I wrote >this code,based on some earlier work I have done: > >buf= bytes((len(qs_array)) * 8

Re: How to write list of integers to file with struct.pack_into?

2023-10-02 Thread Jen Kris via Python-list
the extra overhead, and it's more difficult yet if I'm using the Python integer output in a C program.  Your solution solves those problems.  Oct 2, 2023, 17:11 by python-list@python.org: > On 2023-10-01 23:04, Jen Kris via Python-list wrote: > >> >> Iwant to write

Re: How to write list of integers to file with struct.pack_into?

2023-10-02 Thread MRAB via Python-list
On 2023-10-01 23:04, Jen Kris via Python-list wrote: > > Iwant to write a list of 64-bit integers to a binary file. Everyexample I have seen in my research convertsit to .txt, but I want it in binary. I wrote this code,based on some earlier work I have done: > > buf= bytes((len(qs

Re: How to write list of integers to file with struct.pack_into?

2023-10-02 Thread Barry via Python-list
On 2 Oct 2023, at 16:02, Jen Kris via Python-list wrote: Iwant to write a list of 64-bit integers to a binary file.  Everyexample I have seen in my research convertsit to .txt, but I want it in binary.  I wrote this code,based on some earlier work I have done: buf

How to write list of integers to file with struct.pack_into?

2023-10-02 Thread Jen Kris via Python-list
Iwant to write a list of 64-bit integers to a binary file. Everyexample I have seen in my research convertsit to .txt, but I want it in binary. I wrote this code,based on some earlier work I have done: buf= bytes((len(qs_array)) * 8) foroffset in range(len(qs_array)): item_to_write

Re: File write, weird behaviour

2023-02-19 Thread Thomas Passin
On 2/19/2023 6:10 PM, Mats Wichmann wrote: On 2/19/23 14:06, Dieter Maurer wrote: Azizbek Khamdamov wrote at 2023-2-19 19:03 +0500: ... Example 2 (weird behaviour) file = open("D:\Programming\Python\working_with_files\cities.txt", 'r+') ## contains list cities # the following code DOES NOT add

Re: File write, weird behaviour

2023-02-19 Thread Mats Wichmann
On 2/19/23 14:06, Dieter Maurer wrote: Azizbek Khamdamov wrote at 2023-2-19 19:03 +0500: ... Example 2 (weird behaviour) file = open("D:\Programming\Python\working_with_files\cities.txt", 'r+') ## contains list cities # the following code DOES NOT add new record TO THE BEGINNING of the file IF

Re: File write, weird behaviour

2023-02-19 Thread Dieter Maurer
Azizbek Khamdamov wrote at 2023-2-19 19:03 +0500: > ... >Example 2 (weird behaviour) > >file = open("D:\Programming\Python\working_with_files\cities.txt", >'r+') ## contains list cities ># the following code DOES NOT add new record TO THE BEGINNING of the >file IF FOLLOWED BY readline() and readlin

Re: File write, weird behaviour

2023-02-19 Thread Thomas Passin
On 2/19/2023 2:31 PM, Chris Angelico wrote: On Mon, 20 Feb 2023 at 06:24, Thomas Passin wrote: On 2/19/2023 1:53 PM, Chris Angelico wrote: On Mon, 20 Feb 2023 at 03:41, Azizbek Khamdamov wrote: Example 1 (works as expected) file = open("D:\Programming\Python\working_with_files\cities.txt"

Re: File write, weird behaviour

2023-02-19 Thread MRAB
On 2023-02-19 19:31, Chris Angelico wrote: On Mon, 20 Feb 2023 at 06:24, Thomas Passin wrote: On 2/19/2023 1:53 PM, Chris Angelico wrote: > On Mon, 20 Feb 2023 at 03:41, Azizbek Khamdamov > wrote: >> >> Example 1 (works as expected) >> >> file = open("D:\Programming\Python\working_with_files\

Re: File write, weird behaviour

2023-02-19 Thread Chris Angelico
On Mon, 20 Feb 2023 at 06:24, Thomas Passin wrote: > > On 2/19/2023 1:53 PM, Chris Angelico wrote: > > On Mon, 20 Feb 2023 at 03:41, Azizbek Khamdamov > > wrote: > >> > >> Example 1 (works as expected) > >> > >> file = open("D:\Programming\Python\working_with_files\cities.txt", > >> 'r+') ## cont

Re: File write, weird behaviour

2023-02-19 Thread Peter J. Holzer
On 2023-02-19 12:59:43 -0500, Thomas Passin wrote: > On 2/19/2023 11:57 AM, Axy via Python-list wrote: > > Looks like the data to be written is buffered, so actual write takes > > place after readlines(), when close() flushes buffers. > > > > See io package do

Re: File write, weird behaviour

2023-02-19 Thread Thomas Passin
On 2/19/2023 1:53 PM, Chris Angelico wrote: On Mon, 20 Feb 2023 at 03:41, Azizbek Khamdamov wrote: Example 1 (works as expected) file = open("D:\Programming\Python\working_with_files\cities.txt", 'r+') ## contains list cities Side note: You happened to get lucky with P, w, and c, but for th

Re: File write, weird behaviour

2023-02-19 Thread Chris Angelico
On Mon, 20 Feb 2023 at 03:41, Azizbek Khamdamov wrote: > > Example 1 (works as expected) > > file = open("D:\Programming\Python\working_with_files\cities.txt", > 'r+') ## contains list cities Side note: You happened to get lucky with P, w, and c, but for the future, I recommend using forward slas

Re: File write, weird behaviour

2023-02-19 Thread Thomas Passin
On 2/19/2023 11:57 AM, Axy via Python-list wrote: Looks like the data to be written is buffered, so actual write takes place after readlines(), when close() flushes buffers. See io package documentation, BufferedIOBase. The solution is file.flush() after file.write() Another possibility

Re: File write, weird behaviour

2023-02-19 Thread MRAB
On 2023-02-19 14:03, Azizbek Khamdamov wrote: Example 1 (works as expected) file = open("D:\Programming\Python\working_with_files\cities.txt", 'r+') ## contains list cities # the following code adds new record to the beginning of the file, expected behaviour file.write("new city\n") file.close(

Re: File write, weird behaviour

2023-02-19 Thread Peter J. Holzer
On 2023-02-19 16:57:02 +, Axy via Python-list wrote: > Looks like the data to be written is buffered, so actual write takes place > after readlines(), when close() flushes buffers. > > See io package documentation, BufferedIOBase. > > The solution is file.flush() afte

Re: File write, weird behaviour

2023-02-19 Thread Axy via Python-list
Looks like the data to be written is buffered, so actual write takes place after readlines(), when close() flushes buffers. See io package documentation, BufferedIOBase. The solution is file.flush() after file.write() Can't deny, such a behaviour looks utterly weird. Try to avoid desi

File write, weird behaviour

2023-02-19 Thread Azizbek Khamdamov
Example 1 (works as expected) file = open("D:\Programming\Python\working_with_files\cities.txt", 'r+') ## contains list cities # the following code adds new record to the beginning of the file, expected behaviour file.write("new city\n") file.close() Example 2 (weird behaviour) file = open("D:

Python logging (was Re: What should go to stdout/stderr and why Python logging write everything to stderr?)

2023-01-06 Thread Weatherby,Gerard
FWIW, it wasn’t too difficult to build a logging handler to send messages to Slack. https://pypi.org/project/slack-webclient-logger/ -- https://mail.python.org/mailman/listinfo/python-list

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-06 Thread Peter J. Holzer
m my previous project ;-). I think the general structure is clear enough. You need a formatter to format your log messages, a handler to actually write them and finally a logger to determine what goes where. I can look up the details in the docs but generally the logging is always the same (exce

Re: asyncio and tkinter (was: What should go to stdout/stderr and why Python logging write everything to stderr?)

2023-01-05 Thread Thomas Passin
On 1/5/2023 7:52 PM, Stefan Ram wrote: Thomas Passin writes: On 1/5/2023 4:24 PM, Stefan Ram wrote: You often can replace threads in tkinter by coroutines using asyncio when you write a replacement for the mainloop of tkinter that uses asyncio. Now, try to read only the official documentation

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-05 Thread Thomas Passin
On 1/5/2023 4:24 PM, Stefan Ram wrote: You often can replace threads in tkinter by coroutines using asyncio when you write a replacement for the mainloop of tkinter that uses asyncio. Now, try to read only the official documentation of asyncio and tkinter and figure out only from

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-05 Thread Thomas Passin
owto: >>> logging.basicConfig(level=logging.DEBUG) >>> logging.info('So should this') INFO:root:So should this : Finally! Not quite straightforward, though it is in the Howto. Now about those handlers ... From: Python-list on behalf of Grant Edwards Date: Thurs

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-05 Thread Grant Edwards
On 2023-01-05, Weatherby,Gerard wrote: > logging.basicConfig() > logging.info(“Nice to know”) > logging.debug(“Details for when things are funky”) > logging.warn(“Trouble is brewing”) I always seem to need something slightly more complex. Usually something like: * Specify a log level on the com

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-05 Thread Weatherby,Gerard
/stderr and why Python logging write everything to stderr? *** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. *** On 2023-01-05, Thomas Passin wrote: > The logging system is so configurable that... I find it almost impossible to use unles

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-05 Thread Thomas Passin
On 1/5/2023 3:29 PM, Grant Edwards wrote: On 2023-01-05, Thomas Passin wrote: The logging system is so configurable that... I find it almost impossible to use unless I copy a working example I find somewhere. ;) I'm not at all surprised that the OP didn't understand how it works. I've been

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-05 Thread Grant Edwards
On 2023-01-05, Thomas Passin wrote: > The logging system is so configurable that... I find it almost impossible to use unless I copy a working example I find somewhere. ;) I'm not at all surprised that the OP didn't understand how it works. I've been writing Python programs for over 20 years, a

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-05 Thread Thomas Passin
On 1/5/2023 2:18 PM, Peter J. Holzer wrote: On 2023-01-05 08:31:40 -0500, Thomas Passin wrote: The logging system is so configurable that a user could set a different destination for each level of logging. So it seems that the O.P.'s original question about why the package's developers choose s

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-05 Thread Peter J. Holzer
On 2023-01-05 08:31:40 -0500, Thomas Passin wrote: > The logging system is so configurable that a user could set a different > destination for each level of logging. So it seems that the O.P.'s original > question about why the package's developers choose stderr for all levels can > be answered: "

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-05 Thread Thomas Passin
On 1/5/2023 6:27 AM, Peter J. Holzer wrote: On 2023-01-04 12:32:40 -0500, Thomas Passin wrote: On 1/3/2023 10:35 AM, c.bu...@posteo.jp wrote: The logging module write everything to stderr no matter which logging level is used. The OP wrote this, but it's not so by default. By default

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-05 Thread Peter J. Holzer
On 2023-01-04 12:32:40 -0500, Thomas Passin wrote: > On 1/3/2023 10:35 AM, c.bu...@posteo.jp wrote: > > The logging module write everything to stderr no matter which logging > > level is used. > > The OP wrote this, but it's not so by default. By default it is -

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-04 Thread Chris Angelico
> > this the "usual applicaton output"? > > > > If not, what messages should go into logging.info()? Can you name me > > some examples? > > Example: > > write an app that prints the contents of a file. > > The application output is the contents o

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-04 Thread Barry Scott
main question here is why does Python deciecded to make all logs go to stderr? Maybe I totally misunderstood the intention of logging.info()?! Isn't this the "usual applicaton output"? If not, what messages should go into logging.info()? Can you name me some examples? Example

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-04 Thread Barry Scott
On 03/01/2023 21:24, c.bu...@posteo.jp wrote: Am 03.01.2023 17:51 schrieb r...@zedat.fu-berlin.de: logging.getLogger().addHandler( logging.StreamHandler( sys.stdout )) But I don't want to make all log levels go to stdout. Just DEBUG and INFO. But this would be a workaround. The main quest

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-04 Thread Thomas Passin
On 1/3/2023 10:35 AM, c.bu...@posteo.jp wrote: The logging module write everything to stderr no matter which logging level is used. The OP wrote this, but it's not so by default. There is a HOW-TO page that explains this and how to get the logging package to log everything to a file,

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-04 Thread Peter J. Holzer
writing to stderr, and even that can log to any stream - just pass it as an argument. If none of existing handlers does what you want you can always write your own. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | |

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-04 Thread Peter J. Holzer
logy, but I frequently use the term "stdout" as a shorthand for "standard output" which refers to file descriptor 1, not just to the C FILE* of that name. Or Python's sys.stdout which is a different thing again (but also is a frontend to FD 1). > > One should probably

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-04 Thread Barry Scott
On 04/01/2023 06:46, Chris Angelico wrote: I've known some systems to have a trigger of "reading on FD 0 flushes FD 1" C++ has this feature: Quote from https://en.cppreference.com/w/cpp/io/cin "Once |std::cin| is constructed, std::cin.tie() returns &std::cout

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-04 Thread Barry Scott
On 04/01/2023 02:26, Chris Angelico wrote: Reading/writing the FD is the same as using stdout (technically you'd write to fd 1 and read from fd 0), but yes, can use /dev/tty to reach for the console directly. I think the logic is more like checking that stdin is a tty then using the t

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-04 Thread 2QdxY4RzWzUUiLuE
possible to pipe to arbitrary streams, it > seems. The following uses bash to write “Hi” to the file “third” > opened by Python. I determined the file was 5 empirically. Empirically? > import os > import subprocess > command= 'echo Hi >/dev/fd/5' > fd = os.open("third

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-04 Thread Weatherby,Gerard
Dealing with stdout / stderr is bash is just syntax. I don’t always remember it off the top of my head but … stackoverflow.com. On Linux at least it’s possible to pipe to arbitrary streams, it seems. The following uses bash to write “Hi” to the file “third” opened by Python. I determined the

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Chris Angelico
On Wed, 4 Jan 2023 at 17:26, Eryk Sun wrote: > > On 1/3/23, Chris Angelico wrote: > > > > FDs can also be buffered. If it's buffering you want to avoid, don't > > mess around with exactly which one you're writing to, just flush. > > I meant to flush a C FILE stream or Python file before writing >

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Eryk Sun
On 1/3/23, Chris Angelico wrote: > > FDs can also be buffered. If it's buffering you want to avoid, don't > mess around with exactly which one you're writing to, just flush. I meant to flush a C FILE stream or Python file before writing directly to the file descriptor, in order to avoid out-of-se

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Eryk Sun
engroup.org/onlinepubs/95399/basedefs/xbd_chap10.html > No, the whole point is _not_ to write to stdout (which would corrupt > the program's output). The way I remember it was that you wrote the > prompt to fd 0, and then read the password from fd 0. That way it > worked even when

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Chris Angelico
; of a program while at the same time interacting with a prompt on stderr. > >>> A rare thing, though. > >> > >> Programs that ask for passwords often do it by reading/writing to > >> fd 0 or /dev/tty so that stdout is unaffected. > > > > Reading/wri

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Chris Angelico
On Wed, 4 Jan 2023 at 15:11, Eryk Sun wrote: > > On 1/3/23, Chris Angelico wrote: > > > > writing the FD is the same as using stdout > > Except stdout may be buffered. One should probably flush the buffer > before each raw write to the file descriptor. FDs ca

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Grant Edwards
re thing, though. >> >> Programs that ask for passwords often do it by reading/writing to >> fd 0 or /dev/tty so that stdout is unaffected. > > Reading/writing the FD is the same as using stdout. No, stdout is fd 1. > (technically you'd write to fd 1 and read from fd

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Eryk Sun
On 1/3/23, Chris Angelico wrote: > > writing the FD is the same as using stdout Except stdout may be buffered. One should probably flush the buffer before each raw write to the file descriptor. > use /dev/tty to reach for the console directly. On Windows, open "CON" (rea

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Chris Angelico
On Wed, 4 Jan 2023 at 10:28, Stefan Ram wrote: > > c.bu...@posteo.jp writes: > >But I don't want to make all log levels go to stdout. Just DEBUG and > >INFO. > > The following was stripped down from something some guy > posted on a web site, maybe it was "rkachach". Yet another shining exampl

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Chris Angelico
ific example, but I know I have piped the output > > of a program while at the same time interacting with a prompt on stderr. > > A rare thing, though. > > Programs that ask for passwords often do it by reading/writing to fd 0 > or /dev/tty so that stdout is unaffected. >

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Grant Edwards
On 2023-01-03, Michael Torrie wrote: > On 1/3/23 11:45, Keith Thompson wrote: >> MRAB writes: >> [...] >>> The purpose of stderr is to display status messages, logging and error >>> messages, even user prompts, and not mess up the program's actual >>> output. This is important on a *nix system w

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Chris Angelico
On Wed, 4 Jan 2023 at 09:17, Michael Torrie wrote: > > On 1/3/23 11:45, Keith Thompson wrote: > > MRAB writes: > > [...] > >> The purpose of stderr is to display status messages, logging and error > >> messages, even user prompts, and not mess up the program's actual > >> output. This is importan

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread 2QdxY4RzWzUUiLuE
ging.info()?! Isn't > this the "usual applicaton output"? Aha. This seems to be the misconception. "Usual" in the sense of "the application is running as usual," but not in the sense of "the output the users usually see." Logging is the process where app

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Michael Torrie
On 1/3/23 11:45, Keith Thompson wrote: > MRAB writes: > [...] >> The purpose of stderr is to display status messages, logging and error >> messages, even user prompts, and not mess up the program's actual >> output. This is important on a *nix system where you might be piping >> the output of one

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Chris Angelico
On Wed, 4 Jan 2023 at 08:25, wrote: > > Am 03.01.2023 17:51 schrieb r...@zedat.fu-berlin.de: > > logging.getLogger().addHandler( logging.StreamHandler( sys.stdout )) > > But I don't want to make all log levels go to stdout. Just DEBUG and > INFO. But this would be a workaround. But why are DEBUG

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Cameron Simpson
On Jan 3, 2023, at 10:38 AM, c.bu...@posteo.jp wrote: this posting isn't about asking for a technical solution. My intention is to understand the design decision Python's core developers made in context of that topic. The logging module write everything to stderr no matter which log

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread c . buhtz
Am 03.01.2023 17:51 schrieb r...@zedat.fu-berlin.de: logging.getLogger().addHandler( logging.StreamHandler( sys.stdout )) But I don't want to make all log levels go to stdout. Just DEBUG and INFO. But this would be a workaround. The main question here is why does Python deciecded to make all

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Eryk Sun
On 1/3/23, Weatherby,Gerard wrote: > If sys.stdout is a tty, it typically flushes on newline. e. g. Sorry if I wasn't clear. Yes, a tty file will be buffered, but it's line buffering, which isn't an issue as long as lines are written to stdout. I was referring to full buffering of pipe and disk f

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Weatherby,Gerard
pt ends From: Python-list on behalf of Eryk Sun Date: Tuesday, January 3, 2023 at 1:33 PM To: c.bu...@posteo.jp Cc: python-list@python.org Subject: Re: What should go to stdout/stderr and why Python logging write everything to stderr? *** Attention: This is an external email. Use caution respo

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Thomas Passin
"stderr" stream that can be redirected separately. The following example shows how logging might write to stdout. import logging import sys logging.getLogger().addHandler( logging.StreamHandler( sys.stdout )) logging.error( 'example' ) This is starting to look too m

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Keith Thompson
MRAB writes: [...] > The purpose of stderr is to display status messages, logging and error > messages, even user prompts, and not mess up the program's actual > output. This is important on a *nix system where you might be piping > the output of one program into the input of another. I would ex

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Eryk Sun
On 1/3/23, c.bu...@posteo.jp wrote: > > If the user request the usage info via "-h" it goes to stdout. The standard file for application output is sys.stdout. Note that sys.stdout may be buffered, particularly if it isn't a tty. When a file is buffered, writes are aggregated and only written to t

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Weatherby,Gerard
why Python logging write everything to stderr? *** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. *** On 2023-01-03 15:35, c.bu...@posteo.jp wrote: > Hello, > > this posting isn't about asking for a technical solution. My int

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Richard Damon
 > On Jan 3, 2023, at 10:38 AM, c.bu...@posteo.jp wrote: > Hello, > > this posting isn't about asking for a technical solution. My intention > is to understand the design decision Python's core developers made in > context of that topic. > > The logging mo

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread MRAB
On 2023-01-03 15:35, c.bu...@posteo.jp wrote: Hello, this posting isn't about asking for a technical solution. My intention is to understand the design decision Python's core developers made in context of that topic. The logging module write everything to stderr no matter which log

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Thomas Passin
On 1/3/2023 10:35 AM, c.bu...@posteo.jp wrote: Hello, this posting isn't about asking for a technical solution. My intention is to understand the design decision Python's core developers made in context of that topic. The logging module write everything to stderr no matter which log

What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread c.buhtz
Hello, this posting isn't about asking for a technical solution. My intention is to understand the design decision Python's core developers made in context of that topic. The logging module write everything to stderr no matter which logging level is used. The argparse module do

Re: What to write or search on github to get the code for what is written below:

2022-01-31 Thread Dennis Lee Bieber
3/library/cgi.html You'll still have write the HTML for the pages to be displayed (possibly via template engines as used by Django, Flask, Pylons, Zope), and maybe CSS (pure HTML just describes /what/ to render, leaving it up to the browser to do that rendering -- CSS adds lots of overh

Re: What to write or search on github to get the code for what is written below:

2022-01-31 Thread Chris Angelico
On Tue, 1 Feb 2022 at 02:38, NArshad wrote: > > What about CGI? > Do you know any Library Management System based on CGI just like the one on > Django? > Have you done any research, or are you just picking up a new acronym to see if you can suck some more volunteer time out of this list? ChrisA

Re: What to write or search on github to get the code for what is written below:

2022-01-31 Thread NArshad
What about CGI? Do you know any Library Management System based on CGI just like the one on Django? -- https://mail.python.org/mailman/listinfo/python-list

Re: What to write or search on github to get the code for what is written below:

2022-01-29 Thread Dennis Lee Bieber
On Fri, 28 Jan 2022 14:31:20 -0700, Cousin Stanley declaimed the following: >Dennis Lee Bieber wrote: > >> Ignoring the code spam I presume >> > > I'm an sqlite user myself and was glad to see > the code you posted and have a couple of tiny example > book/author sql3 databases but noth

Re: What to write or search on github to get the code for what is written below:

2022-01-28 Thread Cousin Stanley
Dennis Lee Bieber wrote: > Ignoring the code spam I presume > I'm an sqlite user myself and was glad to see the code you posted and have a couple of tiny example book/author sql3 databases but nothing resembling an actual library check in/out program I've never used PySi

Re: What to write or search on github to get the code for what is written below:

2022-01-28 Thread Dennis Lee Bieber
On Fri, 28 Jan 2022 09:34:39 -0700, Cousin Stanley declaimed the following: > > Your patience and willingness to help and guide someone else > with such a complete and understanable post is hihgly commendable. > Ignoring the code spam I presume I seem to have scared off the O

Re: What to write or search on github to get the code for what is written below:

2022-01-28 Thread Cousin Stanley
Dennis Lee Bieber wrote: > > How would you do this assignment on paper ? > Your patience and willingness to help and guide someone else with such a complete and understanable post is hihgly commendable. Thanks -- Stanley C. Kitching Human Being Phoenix, Arizona -- htt

Re: What to write or search on github to get the code for what is written below:

2022-01-24 Thread NArshad
On Sun, 23 Jan 2022 09:17:38 +1100, Chris Angelico <> declaimed the following: > >Absolutely agree with making a console app first. Though I rather >suspect the OP doesn't want to write any code at all. > I am not writing any code because I don’t know what code to do next

Re: What to write or search on github to get the code for what is written below:

2022-01-24 Thread Dennis Lee Bieber
's done". >Now the problem is what to do next. If I had known, I must have submitted the >whole project at my earliest convenience without coming over here in google >groups. > How would you do this assignment on paper? Print out your spreadsheet and get a larg

Re: What to write or search on github to get the code for what is written below:

2022-01-22 Thread Dennis Lee Bieber
On Sun, 23 Jan 2022 09:17:38 +1100, Chris Angelico declaimed the following: > >Absolutely agree with making a console app first. Though I rather >suspect the OP doesn't want to write any code at all. > Oh, it's gone beyond suspicion -- considering that, at just

Re: What to write or search on github to get the code for what is written below:

2022-01-22 Thread Chris Angelico
t in general, yes, web apps need to think in discrete actions with minimal maintained state. Absolutely agree with making a console app first. Though I rather suspect the OP doesn't want to write any code at all. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: What to write or search on github to get the code for what is written below:

2022-01-22 Thread Dennis Lee Bieber
to forget the web form and multi-user problems and write a text-based console program that can be run from a command line shell. WHEN you get that working you can consider keeping the logic that interfaces with the data store, and replace the "presentation" stuff with HTML generation and

Re: What to write or search on github to get the code for what is written below:

2022-01-22 Thread Avi Gross via Python-list
AGross -Original Message- From: NArshad To: python-list@python.org Sent: Sat, Jan 22, 2022 5:22 am Subject: Re: What to write or search on github to get the code for what is written below: The user is going to enter the book name as the input of an HTML form on a website and I have to check

Re: What to write or search on github to get the code for what is written below:

2022-01-22 Thread Chris Angelico
On Sun, 23 Jan 2022 at 07:47, Dennis Lee Bieber wrote: > If you are doing a web application, how are you going to host it? Who > is responsible for managing the web server? Domain name? Firewalls? > Certificates if you need HTTPS rather than plain insecure HTTP. > > I have a Raspbe

Re: What to write or search on github to get the code for what is written below:

2022-01-22 Thread Dennis Lee Bieber
Above those frameworks are things like Zope -- so-called content management frameworks. And again... You will not find anything like you want... NOBODY is going to write a web application using a spreadsheet as the primary data storage. A spreadsheet, and custom transformation code

Re: What to write or search on github to get the code for what is written below:

2022-01-22 Thread NArshad
The user is going to enter the book name as the input of an HTML form on a website and I have to check whether the book is present or not in the Excel table. openpyxl preferred pandas is also fine anything left. Case sensitivity is not required. I tried to find code or tutorial on google searc

Re: What to write or search on github to get the code for what is written below:

2022-01-20 Thread NArshad
- I will try to follow all that you people are saying, but it will take time or next time. The chance of concurrency is very less. Kindly don't write big descriptions. - The weblink Avi Gross has given is very useful. -- https://mail.python.org/mailman/listinfo/python-list

Re: What to write or search on github to get the code for what is written below:

2022-01-18 Thread Avi Gross via Python-list
2022 2:44 pm Subject: Re: What to write or search on github to get the code for what is written below: On Tue, 18 Jan 2022 07:37:07 -0800 (PST), NArshad declaimed the following: >Avi Gross: >     Not Avi Gross, but that is partly because you replied to Chris Angelico, who was replying to

Re: What to write or search on github to get the code for what is written below:

2022-01-18 Thread Dennis Lee Bieber
o/~ talking to myself in public o/~ On Mon, 17 Jan 2022 15:39:25 -0500, Dennis Lee Bieber declaimed the following: > In one respect, given the limited functionality stated, one gets the >impression of a class GROUP assignment, in which the individual functions >w

Re: What to write or search on github to get the code for what is written below:

2022-01-18 Thread Dennis Lee Bieber
On Tue, 18 Jan 2022 07:37:07 -0800 (PST), NArshad declaimed the following: >Avi Gross: > Not Avi Gross, but that is partly because you replied to Chris Angelico, who was replying to my post replying to an earlier one of yours... >What does the website "https://mail.python.org/mailman/li

Re: What to write or search on github to get the code for what is written below:

2022-01-18 Thread NArshad
Avi Gross: What does the website "https://mail.python.org/mailman/listinfo/python-list"; do? Can I use this for the discussions which I require? -- https://mail.python.org/mailman/listinfo/python-list

Re: What to write or search on github to get the code for what is written below:

2022-01-17 Thread Chris Angelico
On Tue, Jan 18, 2022 at 7:44 AM Dennis Lee Bieber wrote: > Heroku-Specific note: a recent web-page I encountered searching for > information for a different question indicates that Heroku does not support > SQLite3 and, by extension, ANY file-based dynamic data storage (so, no > Excel files either

Re: What to write or search on github to get the code for what is written below:

2022-01-17 Thread Dennis Lee Bieber
On Mon, 17 Jan 2022 01:55:15 -0800 (PST), NArshad declaimed the following: >This is due to the time factor And that opens another can of worms... Before this "assignment" was given to you, surely someone made some sort of estimate of how long it would take to produce, taking into accoun

Re: What to write or search on github to get the code for what is written below:

2022-01-17 Thread Avi Gross via Python-list
working set of software first. Good luck with that.  -Original Message- From: NArshad To: python-list@python.org Sent: Mon, Jan 17, 2022 4:55 am Subject: Re: What to write or search on github to get the code for what is written below: Avi Gross: -“They just were hoping someone would post

Re: What to write or search on github to get the code for what is written below:

2022-01-17 Thread Dennis Lee Bieber
On Tue, 18 Jan 2022 02:51:22 +1100, Chris Angelico declaimed the following: > >I strongly encourage everyone to stop helping the OP until there's >some code to help with. > Well, we did squeeze about four lines of code from the OP -- though still incomplete (no import statements so we hav

Re: What to write or search on github to get the code for what is written below:

2022-01-17 Thread Chris Angelico
On Tue, Jan 18, 2022 at 2:46 AM NArshad wrote: > > Avi Gross: > > -“They just were hoping someone would post complete code and they could then > move on without learning anything.” > > This is due to the time factor Then pay someone to write it. There are plenty of contr

Re: What to write or search on github to get the code for what is written below:

2022-01-17 Thread NArshad
Avi Gross: -“They just were hoping someone would post complete code and they could then move on without learning anything.” This is due to the time factor -- https://mail.python.org/mailman/listinfo/python-list

Re: What to write or search on github to get the code for what is written below:

2022-01-16 Thread Dennis Lee Bieber
On Sat, 15 Jan 2022 02:38:34 -0800 (PST), NArshad declaimed the following: A bit of an improvement -- actual code... But... still not a minimal /runnable/ example... > >Why does the code written below is not giving any output? > >xls = ExcelFile('ABC.xlsx') Where is

Re: What to write or search on github to get the code for what is written below:

2022-01-16 Thread Mats Wichmann
since it was asked here, someone suggesting Python was a pretty expected outcome... > -Original Message- > From: Mats Wichmann > To: python-list@python.org > Sent: Sat, Jan 15, 2022 3:05 pm > Subject: Re: What to write or search on github to get the code for what is > written

  1   2   3   4   5   6   7   8   9   10   >