Re: GNU gettext: Print string translated and untranslated at the same time

2023-08-18 Thread Barry via Python-list
ig deal if it is only one word. The key to solving this to separate the parsing of the string into the .po file and its translation. def i18n(s): return s msg = i18n(‘my message’) print(_(msg)) print(msg) Now you tell the xgettex, pygettext etc, to parse to use “i18n” to find

Re: GNU gettext: Print string translated and untranslated at the same time

2023-08-18 Thread Greg Ewing via Python-list
On 17/08/23 7:10 pm, c.bu...@posteo.jp wrote: def foobar(translate):     if not translate:     # I try to mask the global _() builtins-function     def _(txt):     return txt     return _('Hello') This causes _ to become a local that is left undefined on one branch of the

Re: GNU gettext: Print string translated and untranslated at the same time

2023-08-17 Thread Mirko via Python-list
Am 17.08.23 um 21:17 schrieb c.buhtz--- via Python-list: Hello Mirko, thanks for reply. Am 17.08.2023 18:19 schrieb Mirko via Python-list: You could solve it by defining _() locally like so: def foobar(translate):     _ = gettext.gettext I see no way to do that. It is not the "class based

Re: GNU gettext: Print string translated and untranslated at the same time

2023-08-17 Thread c.buhtz--- via Python-list
Hello Mirko, thanks for reply. Am 17.08.2023 18:19 schrieb Mirko via Python-list: You could solve it by defining _() locally like so: def foobar(translate): _ = gettext.gettext I see no way to do that. It is not the "class based API" of gettext installing _() into the builtins

Re: GNU gettext: Print string translated and untranslated at the same time

2023-08-17 Thread Dieter Maurer via Python-list
c.bu...@posteo.jp wrote at 2023-8-17 07:10 +: >I want to display one string in its original source (untranslated) >version and in its translated version site by site without duplicating >the string in the python source code? You could try to translate into an unknown language: this should

Re: GNU gettext: Print string translated and untranslated at the same time

2023-08-17 Thread Richard Damon via Python-list
uplicating the string in > the python source code? > It wouldn't be a big deal if it is only one word. > >print('The translated string "{}" is originally "{}".'.format(_('Hello'), > 'Hello')) > > But in my situation it is a multi line string containing multip

Re: GNU gettext: Print string translated and untranslated at the same time

2023-08-17 Thread Dieter Maurer via Python-list
c.bu...@posteo.jp wrote at 2023-8-17 07:10 +: >I want to display one string in its original source (untranslated) >version and in its translated version site by site without duplicating >the string in the python source code? Is it an option for you to replace the `gettext` binding by

Re: GNU gettext: Print string translated and untranslated at the same time

2023-08-17 Thread Mirko via Python-list
or if there is an alternative approach. However, you might not need this, because the following seems to work for me: def orig_and_trans(msg): return (_(msg), msg) print('The translated string "{}" is originally "{}".'.format(*orig_and_trans("hello"))) -- https://mail.python.org/mailman/listinfo/python-list

GNU gettext: Print string translated and untranslated at the same time

2023-08-17 Thread c.buhtz--- via Python-list
X-Post: https://stackoverflow.com/q/76913082/4865723 I want to display one string in its original source (untranslated) version and in its translated version site by site without duplicating the string in the python source code? It wouldn't be a big deal if it is only one word. print

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

2022-11-13 Thread Eryk Sun
On 11/13/22, 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): > Fil

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\P

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 (mo

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,

Re: ANN: pdfposter 0.8.1 - scale and tile PDF pages to print on multiple sheets

2022-11-04 Thread jkn
On Friday, November 4, 2022 at 6:21:55 PM UTC, Hartmut Goebel wrote: > I'm pleased to announce pdftools.pdfposter 0.8.1, a tool to scale and > tile PDF images/pages to print on multiple pages. > > :Homepage: https://pdfposter.readthedocs.io/ > :Author:Hartmut Goebel &g

ANN: pdfposter 0.8.1 - scale and tile PDF pages to print on multiple sheets

2022-11-04 Thread Hartmut Goebel
I'm pleased to announce pdftools.pdfposter 0.8.1, a tool to scale and tile PDF images/pages to print on multiple pages. :Homepage:  https://pdfposter.readthedocs.io/ :Author:    Hartmut Goebel :License:   GNU Public License v3 or later (GPL-3.0-or-later) :Quick Installation:     pip install -U

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Dan Stromberg
On Thu, Jun 9, 2022 at 1:52 PM Michael F. Stemper wrote: > On 09/06/2022 12.52, Chris Angelico wrote: > > On Fri, 10 Jun 2022 at 03:44, Dave wrote: > > >> Before I write my own I wondering if anyone knows of a function that > will print a nicely formatted diction

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Grant Edwards
On 2022-06-09, Dennis Lee Bieber wrote: > However, the Gmane list<>NNTP gateway server DOES make the tutor > list available to news readers (unfortunately, the comp.lang.python > <> list <> Gmane has been read-only since last fall (unless things > have changed recently) so I'm stuck with the

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Cameron Simpson
On 09Jun2022 21:35, Dave wrote: >I quite like the format that JSON gives - thanks a lot! Note that JSON output is JavaScript notation, not Python. The `pprint` module (which has `pprint` and `pformat` functions) outputs Python notation. If you're just writing for human eyes, JSON is fine,

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Michael F. Stemper
On 09/06/2022 12.52, Chris Angelico wrote: On Fri, 10 Jun 2022 at 03:44, Dave wrote: Before I write my own I wondering if anyone knows of a function that will print a nicely formatted dictionary? By nicely formatted I mean not all on one line! https://docs.python.org/3/library

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Friedrich Rentsch
of a function that will print a nicely formatted dictionary? By nicely formatted I mean not all on one line! Cheers Dave -- https://mail.python.org/mailman/listinfo/python-list

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Dave
ot;pprint" and "json". > > main.py > > import json > d ={ 1:2, 'alpha': 'beta' } > print( json.dumps( d, indent=4 )) > > output > > { >"1": 2, >"alpha": "beta" > } > -- https://mail.python.org/mailman/listinfo/python-list

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Mats Wichmann
On 6/9/22 11:52, Chris Angelico wrote: > On Fri, 10 Jun 2022 at 03:44, Dave wrote: >> >> Hi, >> >> Before I write my own I wondering if anyone knows of a function that will >> print a nicely formatted dictionary? >> >> By nicely format

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Avi Gross via Python-list
. Consider using a search engine before posting. Throw in a few words like  "python pretty print dictionary function" and refine that if it does not get you immediate results. It is free and easy and does not waste time for so many others who already know or don't care. And consider rea

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Chris Angelico
On Fri, 10 Jun 2022 at 03:44, Dave wrote: > > Hi, > > Before I write my own I wondering if anyone knows of a function that will > print a nicely formatted dictionary? > > By nicely formatted I mean not all on one line! > https://docs.python.org/3/library/pprint.html f

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread MRAB
On 2022-06-09 11:43, Dave wrote: Hi, Before I write my own I wondering if anyone knows of a function that will print a nicely formatted dictionary? By nicely formatted I mean not all on one line! It's called "pretty-printing". Have a look at the 'pprint' module. -- https://mail.

Re: Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Larry Martell
On Thu, Jun 9, 2022 at 11:44 AM Dave wrote: > > Hi, > > Before I write my own I wondering if anyone knows of a function that will > print a nicely formatted dictionary? > > By nicely formatted I mean not all on one line! >>> import json >>> d = {'Jo

Function to Print a nicely formatted Dictionary or List?

2022-06-09 Thread Dave
Hi, Before I write my own I wondering if anyone knows of a function that will print a nicely formatted dictionary? By nicely formatted I mean not all on one line! Cheers Dave -- https://mail.python.org/mailman/listinfo/python-list

Re: how to distinguish return from print()

2022-05-25 Thread Meredith Montgomery
r...@zedat.fu-berlin.de (Stefan Ram) writes: > Meredith Montgomery writes: > ... >>def f(x): >>return x + 1 > ... >>>>> print("hello") > > To me, what would make more sense would be: > > Teacher: > > |>>>

Re: F-string usage in a print()

2022-05-24 Thread Cameron Simpson
atting method was the % operator like C's printf() format. You could do stuff like this: print("%s: length is %d items" % (thing, len(thing))) which would print something like: Thing5: length is 12 items Ignore the print() itself, that's just how you might use this: format

Re: F-string usage in a print()

2022-05-24 Thread Cameron Simpson
> # future_value += monthly_interest_amount > # display the result > print(f"Year = ", years + f"Future value = \n", future_value) > >When joining a string with a number, use an f-string otherwise, code a >str() because a implicit convert of an int to str causes a >

Re: F-string usage in a print()

2022-05-24 Thread Mats Wichmann
thly_interest_rate ># future_value += monthly_interest_amount ># display the result >print(f"Year = ", years + f"Future value = \n", future_value)When joining > a string with a number, use an f-string otherwise, code a str() because a > implicit convert of an int to

Re: F-string usage in a print()

2022-05-24 Thread Paul Bryan
Try something like: print(f"Year = {years}, Future value = {future_value}") On Tue, 2022-05-24 at 21:14 +, Kevin M. Wilson via Python-list wrote: > future_value = 0 > for i in range(years): > # for i in range(months): >    future_value += monthly_investment >

Re: F-string usage in a print()

2022-05-24 Thread MRAB
+= monthly_interest_amount # display the result print(f"Year = ", years + f"Future value = \n", future_value)When joining a string with a number, use an f-string otherwise, code a str() because a implicit convert of an int to str causes a TypeError!Well...WTF! Am I no

F-string usage in a print()

2022-05-24 Thread Kevin M. Wilson via Python-list
future_value = 0 for i in range(years): # for i in range(months): future_value += monthly_investment future_value = round(future_value, 2) # monthly_interest_amount = future_value * monthly_interest_rate # future_value += monthly_interest_amount # display the result print(f"

Re: how to distinguish return from print()

2022-05-22 Thread Chris Angelico
On Mon, 23 May 2022 at 09:23, Stefan Ram wrote: > You are making it extra hard by wording the question in this > way. "What's the difference between the moon and liberty?". Uh ... > > It's much easier to explain the moon and liberty separately. "You can't tell the difference between a lump

how to distinguish return from print()

2022-05-22 Thread Meredith Montgomery
Students seeing a programming language for the first time and using Python's REPL for the first time have asked me what is the difference between a return statement and a print() call. They got a point. --8<---cut here---start->8--- def f(x): return

[issue512497] multi-line print statement

2022-04-10 Thread admin
Change by admin : -- github: None -> 36025 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue515000] print result of f.tell() in test

2022-04-10 Thread admin
Change by admin : -- github: None -> 36054 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue431422] print not emitting POP_TOP

2022-04-10 Thread admin
Change by admin : -- github: None -> 34599 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue431060] print 'foo',;readline() softspace error

2022-04-10 Thread admin
Change by admin : -- github: None -> 34596 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue515021] lib/smtpd.py print refused addresses

2022-04-10 Thread admin
Change by admin : -- github: None -> 36065 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue484866] print '\b', '\a', etc.

2022-04-10 Thread admin
Change by admin : -- github: None -> 35569 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue477863] Print warning at shutdown if gc.garbage not empty

2022-04-10 Thread admin
Change by admin : -- github: None -> 35458 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue484857] print with comma ended

2022-04-10 Thread admin
Change by admin : -- github: None -> 35568 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue480215] softspace confused in nested print

2022-04-10 Thread admin
Change by admin : -- github: None -> 35499 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue467381] print statement and exception

2022-04-10 Thread admin
Change by admin : -- github: None -> 35269 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue215918] 2.0b2: print a_module.__dict__ also prints the license text

2022-04-10 Thread admin
Change by admin : -- github: None -> 33261 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue417030] print '%*s' fails for unicode string

2022-04-10 Thread admin
Change by admin : -- github: None -> 34363 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue405849] print (float) of Python 2.0

2022-04-10 Thread admin
Change by admin : -- github: None -> 34058 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue229840] IDLE needs to print !

2022-04-10 Thread admin
Change by admin : -- github: None -> 33788 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue233717] mimetools: Nice libraries don't "print"

2022-04-10 Thread admin
Change by admin : -- github: None -> 33995 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue215918] 2.0b2: print a_module.__dict__ also prints the license text

2022-04-10 Thread admin
Change by admin : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue401439] Better syntax for print ( 'print [to file [, ]] [(arg , )*]' )

2022-04-10 Thread admin
Change by admin : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue401346] print warning if exception occurs in GC

2022-04-10 Thread admin
Change by admin : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue400970] extended print statement

2022-04-10 Thread admin
Change by admin : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue401439] Better syntax for print ( 'print [to file [, ]] [(arg , )*]' )

2022-04-10 Thread admin
Change by admin : -- github: None -> 33056 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue401346] print warning if exception occurs in GC

2022-04-10 Thread admin
Change by admin : -- github: None -> 33009 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue400970] extended print statement

2022-04-10 Thread admin
Change by admin : -- github: None -> 32648 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45405] configure fails on macOS with non-Apple clang version 13 which implements --print-multiarch

2022-03-15 Thread Ned Deily
Change by Ned Deily : -- priority: release blocker -> resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue45405] configure fails on macOS with non-Apple clang version 13 which implements --print-multiarch

2022-03-15 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset dea270a2a80214de22afadaaca2043d0d782eb7d by Ned Deily in branch '3.8': bpo-45405: Prevent internal configure error when running configure with recent versions of clang. (GH-28845) (GH-31889)

[issue45405] configure fails on macOS with non-Apple clang version 13 which implements --print-multiarch

2022-03-15 Thread Ned Deily
Ned Deily added the comment: New changeset 720bb456dc711b0776bae837d1f9a0b10c28ddf2 by Ned Deily in branch '3.7': bpo-45405: Prevent internal configure error when running configure with recent versions of clang. (GH-28845) (GH-31890)

[issue45405] configure fails on macOS with non-Apple clang version 13 which implements --print-multiarch

2022-03-15 Thread Ned Deily
Ned Deily added the comment: As of Xcode 13.3, released 2022-03-14 to support macOS 12.3 et al, the included Apple Clang (Apple clang version 13.1.6 (clang-1316.0.21.2)) now supports the --print-multiarch option and so Python 3.8 and 3.7 are now vulnerable to this issue when building

[issue45405] configure fails on macOS with non-Apple clang version 13 which implements --print-multiarch

2022-03-15 Thread Ned Deily
Change by Ned Deily : -- pull_requests: +29988 pull_request: https://github.com/python/cpython/pull/31890 ___ Python tracker ___

[issue45405] configure fails on macOS with non-Apple clang version 13 which implements --print-multiarch

2022-03-15 Thread Ned Deily
Change by Ned Deily : -- pull_requests: +29987 pull_request: https://github.com/python/cpython/pull/31889 ___ Python tracker ___

[issue32669] cgitb file to print OSError exceptions

2022-03-13 Thread Irit Katriel
Irit Katriel added the comment: cgi/cgitb are deprecated as per PEP 594, so there won't be further enhancements to them. -- nosy: +iritkatriel resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker

[issue46949] Print an indication if traceback exceeds sys.tracebacklimit

2022-03-07 Thread Irit Katriel
Irit Katriel added the comment: Re what the limit means, it’s a bit messier than that, see issue38197. -- ___ Python tracker ___

[issue46949] Print an indication if traceback exceeds sys.tracebacklimit

2022-03-07 Thread Eric V. Smith
Eric V. Smith added the comment: If you go with the second idea, I'd say something like f"More than {2 * tracebacklimit} additional stack frames not shown". It seems handy to know the magnitude of the problem. -- nosy: +eric.smith ___ Python

[issue46949] Print an indication if traceback exceeds sys.tracebacklimit

2022-03-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: It skips the least recent frames: >>> def error(): 1 / 0 ... >>> def g(): error() ... >>> def f(): g() ... >>> sys.tracebacklimit = 2 >>> f() Traceback (most recent call last): File "", line 1, in g File "", line 1, in error ZeroDivisionError: division

[issue46949] Print an indication if traceback exceeds sys.tracebacklimit

2022-03-07 Thread Guido van Rossum
Guido van Rossum added the comment: There is general confusion as to which part of the traceback is truncated. If I have main() -> f() -> g() -> error(), and the limit is 2, does it print main() -> f(), or does it print g() -> error()? (I'm not even sure which would be more

[issue46949] Print an indication if traceback exceeds sys.tracebacklimit

2022-03-07 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : If the number of frames in a traceback exceeds sys.tracebacklimit (which defaults to 1000), any remaining frames are silently dropped. See https://docs.python.org/3.10/library/sys.html#sys.tracebacklimit. This is confusing to users. We should print some

[issue34135] The results of time.tzname print broken.

2022-01-17 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46282] print() docs do not indicate its return value

2022-01-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: > Barry: The PEP 8 'return None' recommendation could be added to the Reference > entry for 'return'. But I think this should be a separate issue as 1) it is > about coding rather than documentation and 2) there is the possible objection > that choosing

[issue46282] print() docs do not indicate its return value

2022-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: How about following "The Python interpreter has a number of functions and types built into it that are always available. They are listed here in alphabetical order." in https://docs.python.org/3/library/functions.html with "Here and elsewhere in these docs,

[issue46282] print() docs do not indicate its return value

2022-01-07 Thread Éric Araujo
Change by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46282] print() docs do not indicate its return value

2022-01-06 Thread James Gerity
ringo__ | I used abs() as an example. In fact I was wondering what does print() | return. I *guessed* it returns None, but the do

[issue46282] print() docs do not indicate its return value

2022-01-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: Sure, there will always be some users who will find certain things not obvious. Sometimes I'm that user myself. What did this user think print() returned? What precisely was their question? Perhaps if I saw the conversation in context, I would be more

[issue46282] print() docs do not indicate its return value

2022-01-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I think it does a better service to users to explain how Python returns None implicitly if a function doesn't have any other explicit return value. If the print() docs had this note, it would be confusing why other similar functions don't. It's also

[issue46282] print() docs do not indicate its return value

2022-01-06 Thread James Gerity
James Gerity added the comment: I opened this ticket on behalf of a user who asked about print() specifically in #python on the Libera IRC network, who I assume does not find this obvious. I don't think it would be tenable to add this note to every built-in, but that's not the intended

[issue46282] print() docs do not indicate its return value

2022-01-06 Thread Steven D'Aprano
New submission from Steven D'Aprano : Do the print docs need to mention something so obvious? Functions and methods which operate by side-effect typically don't mention that they return None, see for example the docs for various builtin methods: https://docs.python.org/3/library

[issue46282] print() docs do not indicate its return value

2022-01-06 Thread James Gerity
Change by James Gerity : -- keywords: +patch pull_requests: +28642 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30435 ___ Python tracker ___

[issue46282] print() docs do not indicate its return value

2022-01-06 Thread James Gerity
Change by James Gerity : -- assignee: docs@python components: Documentation nosy: SnoopJeDi, docs@python priority: normal severity: normal status: open title: print() docs do not indicate its return value versions: Python 3.11 ___ Python tracker

[issue46199] Calculation influenced by print

2021-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: When you do: FINUB = np.empty(len(close)) FINLB = np.empty(len(close)) you're creating two *uninitialised* arrays of values. (See the NumPy documentation at https://numpy.org/doc/stable/reference/generated/numpy.empty.html.) When you then do

[issue46210] print deadlocks

2021-12-30 Thread Jason Wilkes
Change by Jason Wilkes : -- keywords: +patch pull_requests: +28524 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30310 ___ Python tracker ___

[issue46210] print deadlocks

2021-12-30 Thread Jason Wilkes
, in practice. All the non-obvious deadlocks I've encountered seemed to be due to one thing, namely stdout and stderr's buffer->lock not having an _at_fork_reinit. So if a thread is printing during a fork, the child process can never print, else deadlock. Standard hazard of threading and fork

[issue46199] Calculation influenced by print

2021-12-30 Thread Steven D'Aprano
Steven D'Aprano added the comment: Please try to provide a minimal reproducible example: https://stackoverflow.com/help/minimal-reproducible-example http://sscce.org/ At the very least, you need to provide three pieces of information: 1. What you tried. 2. What you expected to happen (and

[issue46199] Calculation influenced by print

2021-12-29 Thread Eric V. Smith
Eric V. Smith added the comment: This is likely not a bug in python. You might have better luck asking on a numpy support list. That said, what results do you get, and what do you expect to get? We don't know what error you're seeing. You might replace: print("LB: ", LB) wi

[issue46199] Calculation influenced by print

2021-12-29 Thread wby78826
New submission from wby78826 : (Could be a numpy bug) ##Just run the script, then uncomment Line 14 and run again The result of "supertrend" is different, depending on whether I print "LB" first or not. If I don't print it first, the result is wrong. It also does'

Re: print('\N{flag: Mauritius}') not supported in py3.9

2021-12-21 Thread boB Stepp
On 21/12/22 12:14PM, Python wrote: On 30/11/2021 12.31, Cameron Simpson wrote: On 30Nov2021 10:59, DL Neil wrote: ... I've nominated Kitty as Fedora's default terminal. We'll see how it goes with work-loads beyond raising the flag... I'd like to hear how that goes down the track. If I

Re: print('\N{flag: Mauritius}') not supported in py3.9

2021-12-21 Thread dn via Python-list
On 30/11/2021 12.31, Cameron Simpson wrote: > On 30Nov2021 10:59, DL Neil wrote: ... >> I've nominated Kitty as >> Fedora's default terminal. We'll see how it goes with work-loads beyond >> raising the flag... > > I'd like to hear how that goes down the track. If I find myself on a > Linux

Re: PyCharm settings - per: print('\N{flag: Mauritius}') not supported in py3.9

2021-12-21 Thread Abdur-Rahmaan Janhangeer
Yet another unicode issue XD Kind Regards, Abdur-Rahmaan Janhangeer about | blog github Mauritius -- https://mail.python.org/mailman/listinfo/python-list

[issue34135] The results of time.tzname print broken.

2021-12-12 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> out of date status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing

PyCharm settings - per: print('\N{flag: Mauritius}') not supported in py3.9

2021-12-01 Thread dn via Python-list
On 29/11/2021 10.08, dn via Python-list wrote: > On 29/11/2021 02.18, Chris Angelico wrote: >> On Mon, Nov 29, 2021 at 12:10 AM Abdur-Rahmaan Janhangeer >> wrote: >> >> Flags are actually constructed from multiple codepoints. What you want >> is to insert each codepoint separately. You can see

Re: print('\N{flag: Mauritius}') not supported in py3.9

2021-11-29 Thread Cameron Simpson
On 30Nov2021 10:59, DL Neil wrote: >Fedora names it as rxvt-unicode. >Installed v9.26 >Text is too small for these old eyes. Fair enough. There are resources, but not worth it unless you really want the app. >No menu bar and no context menus. Um, yes. The (hardware, serial) terminals we had a

Re: print('\N{flag: Mauritius}') not supported in py3.9

2021-11-29 Thread dn via Python-list
On 30/11/2021 10.19, Cameron Simpson wrote: > On 29Nov2021 22:25, DL Neil wrote: Probably a font issue. Not many fonts support the flags. >>> >>> Agree about the font support. Some terminal emulators make an effort to >>> have fallback fonts for when your preferred font lacks a glyph. IIRC

Re: print('\N{flag: Mauritius}') not supported in py3.9

2021-11-29 Thread Cameron Simpson
On 29Nov2021 22:25, DL Neil wrote: >>> Probably a font issue. Not many fonts support the flags. >> >> Agree about the font support. Some terminal emulators make an effort to >> have fallback fonts for when your preferred font lacks a glyph. IIRC >> urxvt is such a terminal on Linux. > >Not sure

[issue45912] [argparse] Print texts starting with capital letters and finish with dot for more formality

2021-11-29 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with @iritkatriel. Also, such a change to argparse would be too disruptive. So, I'm going to close this. -- components: +Library (Lib) -Parser nosy: +eric.smith resolution: -> wont fix stage: -> resolved status: open -> closed type: ->

Re: print('\N{flag: Mauritius}') not supported in py3.9

2021-11-29 Thread dn via Python-list
On 29/11/2021 12.06, Cameron Simpson wrote: > On 29Nov2021 09:19, Chris Angelico wrote: >> On Mon, Nov 29, 2021 at 8:10 AM dn via Python-list >> wrote: >>> However, when trying the above, with our local flag in (Fedora Linux, >>> Gnome) Terminal or PyCharm's Run terminal; the two letters "N" and

Re: print('\N{flag: Mauritius}') not supported in py3.9

2021-11-28 Thread Cameron Simpson
On 29Nov2021 09:19, Chris Angelico wrote: >On Mon, Nov 29, 2021 at 8:10 AM dn via Python-list > wrote: >> However, when trying the above, with our local flag in (Fedora Linux, >> Gnome) Terminal or PyCharm's Run terminal; the two letters "N" and "Z" >> are shown with dotted-outlines. Similarly,

Re: print('\N{flag: Mauritius}') not supported in py3.9

2021-11-28 Thread Chris Angelico
On Mon, Nov 29, 2021 at 8:10 AM dn via Python-list wrote: > However, when trying the above, with our local flag in (Fedora Linux, > Gnome) Terminal or PyCharm's Run terminal; the two letters "N" and "Z" > are shown with dotted-outlines. Similarly, the Mauritius' flag is shown > as "M" and "U". >

Re: print('\N{flag: Mauritius}') not supported in py3.9

2021-11-28 Thread dn via Python-list
On 29/11/2021 02.18, Chris Angelico wrote: > On Mon, Nov 29, 2021 at 12:10 AM Abdur-Rahmaan Janhangeer > wrote: > > Flags are actually constructed from multiple codepoints. What you want > is to insert each codepoint separately. You can see them listed in the > second column of the table you

  1   2   3   4   5   6   7   8   9   10   >