Re: [python-committers] [RELEASE] Python 3.11 release candidate 1 (3.11.0rc1) is available

2022-08-08 Thread Terry Reedy
On 8/8/2022 12:59 PM, Pablo Galindo Salgado wrote: Python 3.11.0 is almost ready. This release, 3.11.0rc1, is the penultimate release preview. You can get it here: ## This is the first release candidate of Python 3.11 https://www.python.org/downloads/release/python-3110rc1/

Explaining exec(globals, separate_locals)

2021-09-20 Thread Terry Reedy
with peculiar locals behavior, and with 'return', 'yield', and 'nonlocal' valid. It would make no sense to treat the code passed to exec as a function suite. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: ANN: Dogelog Runtime, Prolog to the Moon (2021)

2021-09-13 Thread Terry Reedy
different similarly small benchmarks. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Friday Finking: Contorted loops

2021-09-10 Thread Terry Reedy
while. Or maybe it needs to be read more. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Friday Finking: Contorted loops

2021-09-09 Thread Terry Reedy
al keyword, is even harder. Three of us could not get all the cases we tested correct and I suspect doing so without running the PEG parser may be impossible. Since highlighting is redone with each keystroke, I suspect doing the latter would add a noticeable and unacceptable lag between keystrokes and display. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem with python

2021-09-04 Thread Terry Reedy
In interactive mode, print is not usually needed. >>> sysconfig.get_python_inc() 'C:\\Programs\\Python310\\include' -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

How to include insertion order in dict equality

2021-09-04 Thread Terry Reedy
searchable, I list them here. Steven D'Aprano: d1 == d2 and all(k1 == k2 for k1, k2 in zip(d1, d2)) Sethiy Storchaka: list(d1.items()) == list(d2.items()) # When using unittest, produces nicer report on failure. Raymond Hettinger: assert OrderedDict(d) == OrderedDict(e) -- Terry Jan Reedy --

Re: on writing a while loop for rolling two dice

2021-08-28 Thread Terry Reedy
== y: return i, (x,y) # return "The universe ends as the essentially impossible happened" -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: on the popularity of loops while and for

2021-08-28 Thread Terry Reedy
27;ll do. Try something like fors = 0 for file in files: for line in file: if re.match(r"/s*for .* in ", line): fors += 1 This excludes comprehensions, which have replaced some for loops. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Can't get rid of old version of python

2021-08-13 Thread Terry Reedy
tall a package, e.g. germalemma. Python 3.8.10 can use it, but Python 3.9.6 can't find it. If 'py' starts 3.9, then py -m pip install xyz will install xyz for 3.9. (In not, py -3.9 -m pip ... will) The command 'python' takes one to the MS store unless one has alr

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-13 Thread Terry Reedy
integral frequencies, which I suspect might be true, ditto, unless you get custom software. You could look at pygame and see what its sound functions do. And search pypi for 'sound generator' or 'frequency generator'. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: some problems for an introductory python test

2021-08-10 Thread Terry Reedy
On 8/10/2021 5:27 PM, Hope Rouselle wrote: Terry Reedy writes: On 8/10/2021 9:15 AM, Hope Rouselle wrote: 2.__add__(3) SyntaxError: invalid syntax But then I tried: (2).__add__(3) 5 Add a space is easier. 2 .__add__(3) 5 Hah. That's brilliant! So cool. Python is a l

Re: some problems for an introductory python test

2021-08-10 Thread Terry Reedy
On 8/10/2021 9:15 AM, Hope Rouselle wrote: 2.__add__(3) SyntaxError: invalid syntax But then I tried: (2).__add__(3) 5 Add a space is easier. >>> 2 .__add__(3) 5 >>> -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: CODING PAGE ACCESS

2021-08-07 Thread Terry Reedy
rsion of module docs generated from the installed modules. I wish to access the page where I do coding.I would appreciate help, either directly, or with information as to where I can get help.Thank you so much! -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Subtle difference between any(a list) and any(a generator) with Python 3.9

2021-07-29 Thread Terry Reedy
as soon it finds a True value and returns True. When "any" deals with a list, the whole list is calculated first, and then "any" looks for a True. Before 3.9 and the walrus operator, the two ways always provide the same result, in a faster way with a generator. Since the

Re: a simple question

2021-07-27 Thread Terry Reedy
(100) is an example. Can you tell me what is wrong. On Windows, normal install, C:\Users\Terry>py -3.9 -m turtle C:\Users\Terry>py -3.9 -m turtledemo both work. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and Ubuntu versions

2021-07-24 Thread Terry Reedy
gmane.comp.python.general. Posting there is unconventional. Huh? If you read this, posting from gmane works fine! -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and Ubuntu versions

2021-07-23 Thread Terry Reedy
after its release in Sept. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: zoneinfo not working properly

2021-07-18 Thread Terry Reedy
an upgrade thereof, then maybe you need to install tzdata for the new installation. Being on Windows, where this is not available, I cannot help further. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter widgets for desktop database application

2021-07-14 Thread Terry Reedy
ual and it seems suitable for editing flat table. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Unfindable module: code

2021-07-03 Thread Terry Reedy
erpreter I think that would be better. The module include an console function, so it can be used as is. ? and REPL implementation"? Nah. I believe codeop is only for interactive code. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: IDLE is not working after Python installation .

2021-06-22 Thread Terry Reedy
ndows and macOS, IDLE is usually started from an installed icon. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Subpixel positioning on Tk canvas

2021-06-19 Thread Terry Reedy
ribed here: https://wiki.tcl-lang.org/page/tkpath For the wrapping, look at the implementation files of Tkinter, for say, the original canvas, and modify accordingly. Christian -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter problem

2021-06-19 Thread Terry Reedy
baseName = baseName + ext 2022 interactive = 0 -> 2023 self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) 2024 if useTk: 2025 self._loadtk() TclError: couldn't connect to display ":0.0" -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Strange disassembly

2021-06-19 Thread Terry Reedy
On 6/18/2021 8:13 PM, Chris Angelico wrote: On Sat, Jun 19, 2021 at 9:50 AM Terry Reedy wrote: Why are there two separate bytecode blocks for the "raise Exception"? Because one block must POP_TOP and other must not. I'd have thought that the double condition would still be e

Re: Faker package

2021-06-18 Thread Terry Reedy
o generate random data that conforms to whatever specification. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Strange disassembly

2021-06-18 Thread Terry Reedy
8 LOAD_CONST 2 (10) 10 LOAD_FAST0 (x) 12 COMPARE_OP 1 (<=) 14 POP_JUMP_IF_FALSE 10 (to 20) >> 16 LOAD_GLOBAL 0 (Exception) 18 RAISE_VARARGS1 >> 20 LOAD_CONST 0 (None) 22 RETURN_VALUE >>> -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: How Do I Get A Bug In Multiprocessing Fixed?

2021-06-18 Thread Terry Reedy
it with 3.9.5 and 3.10.0b3. 3.8 only gets security fixes. To get attention, demonstrate that there is a problem with current versions. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: tkinter: tksheet

2021-06-16 Thread Terry Reedy
aster/DOCUMENTATION.md#5-modifying-table-data insert_row() and change the column used for sorting (e.g., sorting by company number or company name). I did not see anything about sorting. tksheet is generic 'table', not a database viewer -- Terry Jan Reedy -- https://mail.python.org/m

Re: Behaviour of pop() for dictionaries

2021-06-14 Thread Terry Reedy
name was added. Note that deques have a popleft in addition to pop (right). -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: curses apps on MS Windows?

2021-06-14 Thread Terry Reedy
s the same console as its interface. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Replacement for Mailman

2021-06-08 Thread Terry Reedy
the web UI. I'm pretty sure that's out of date. https://pypi.org/project/mailman/ 3.3.4 works with 3.6 to 3.9 -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Replacement for Mailman

2021-06-08 Thread Terry Reedy
ar. I don't know if RedHat, for instance, followed through with plans to extend security fixes for customers paying for long-term support releases. If they have, a patched 2.7 might be safer than the last 3.5. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Posting code on stackoverflow

2021-06-05 Thread Terry Reedy
e*, it did not work. paste, reselect (a nuisance) and click does. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Python app setup

2021-06-01 Thread Terry Reedy
mediately and delete all copies of this message. When one sends a message to a mailing list or newsgroup, this is complete nonsense. The 'addressee' is anyone and everyone in the world. Try to avoid it if you can. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.9.5

2021-06-01 Thread Terry Reedy
On 5/31/2021 3:15 AM, said ganoune wrote: Just installed python 3.9.5 in my HP laptop, cant open it. Laptop hp I3 running with windows 10. You have to say a lot more. How did you install, with what options? How do you try to 'open' (start) it? What happens instead? -- Terry

Re: Definition of "property"

2021-05-30 Thread Terry Reedy
entation. When a normal attribute is converted to a 'property', it effectively still is an attribute. The syntax manipulating the attribute remains the same. If one can set, get, and delete something dotted notation, it is an attribute. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: string storage [was: Re: imaplib: is this really so unwieldy?]

2021-05-26 Thread Terry Reedy
On 5/26/2021 12:07 PM, Chris Angelico wrote: On Thu, May 27, 2021 at 1:59 AM Jon Ribbens via Python-list wrote: On 2021-05-26, Alan Gauld wrote: On 25/05/2021 23:23, Terry Reedy wrote: In CPython's Flexible String Representation all characters in a string are stored with the same numb

Re: imaplib: is this really so unwieldy?

2021-05-25 Thread Terry Reedy
ding to produce characters. Or any other Python object. Use the wrong encoding (say ISO-Latin-1) when the data is really UTF-8 will result in garbage. So does decoding bytes as text when the bytes encode something else, such as an image ;-). -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Question for potential python development contributions on Windows

2021-05-24 Thread Terry Reedy
On 5/23/2021 10:05 PM, Terry Reedy wrote: On 5/23/2021 12:20 PM, pjfarl...@earthlink.net wrote: I asked this question on python-dev last week but did not get an answer.  If anyone here know the answer I would appreciate it. The Python Developers Guide specifically states to get VS2017 for

Re: Question for potential python development contributions on Windows

2021-05-23 Thread Terry Reedy
from VS2017 and VS2015. I believe the only issue would be is one were developing a patch to a CPython .c file and one used recent C## features not allowed in CPython code. You could open an issue on bugs.python.org asking that the doc be clarified. -- Terry Jan Reedy -- https://mail.python.org

Re: If you have Python Cookbook, 3rd ed.

2021-05-21 Thread Terry Reedy
On 5/19/2021 2:57 PM, Terry Reedy wrote: can you verify that the Algorithm chapter (near end in 2nd ed.) does *NOT* have an introduction by Tim Peters? (Info needed to verify timeit doc correction https://github.com/python/cpython/pull/21744) Thank you to 2 respondents. I have gone ahead

Python at SpaceX

2021-05-21 Thread Terry Reedy
“For development and test of these algorithms, we have a full-scale network simulation running in continuous integration on a high-performance computing cluster. This simulation is capable of running the C++ production code as well as running against prototype code written in Python,”

Re: Unexpected Inheritance Problem

2021-05-20 Thread Terry Reedy
n between (unlike the default font here in Thunderbird, or in Firefox). This is the only monospaced TrueType font available in the Windows console with this property. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: If you have Python Cookbook, 3rd ed.

2021-05-20 Thread Terry Reedy
On 5/20/2021 1:14 PM, boB Stepp wrote: On Thu, May 20, 2021 at 11:43 AM Terry Reedy wrote: can you verify that the Algorithm chapter (near end in 2nd ed.) does *NOT* have an introduction by Tim Peters? (Info needed to verify timeit doc correction https://github.com/python/cpython/pull/21744

Re: Python install failing. Install log is available.

2021-05-20 Thread Terry Reedy
the python path correctly *for all users* C:\WINDOWS\system32>whoami ... Any thoughts? On Windows, use the py launcher to launch python. It was added as the solution to problems with adding python paths, including problems with multiple installs and those with removing them. -- Terry J

If you have Python Cookbook, 3rd ed.

2021-05-20 Thread Terry Reedy
can you verify that the Algorithm chapter (near end in 2nd ed.) does *NOT* have an introduction by Tim Peters? (Info needed to verify timeit doc correction https://github.com/python/cpython/pull/21744) -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: How to build stable 3.9 branch from fork and clone of cpython

2021-05-18 Thread Terry Reedy
ibute to 3.9 is going to need to work correctly on both branches. It must be 'main' for any python/??? repository. The only time an initial contribution would be for 3.9 would be for a bug that only exists in 3.9, which is very rare. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Standarize TOML?

2021-05-17 Thread Terry Reedy
if we want just a parser, maybe we should generate one from the grammar. Then there are broader 'What should be in the stdlib discussions. If anyone has *new information* about toml, post it there. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Decoratored functions parsed differently by ast stdlib between 3.7 and 3.8

2021-05-03 Thread Terry Reedy
numbering and tracing and replaced the internal lineno data structure. Your example code still outputs 2. So Mark either missed this case or considers it correct. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: cant use certain commands, leading to more problems

2021-04-28 Thread Terry Reedy
thon with that file >py -m module # run module as a command -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Not found in the documentation

2021-04-27 Thread Terry Reedy
raceback (most recent call last): File "", line 1, in if True: NameError: name 'j' is not defined str(1+1j) '(1+1j)' repr(1+1j) '(1+1j)' str(.999) '1.0' str(0xff34) '65332' -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: do ya still use python?

2021-04-22 Thread Terry Reedy
On 4/21/2021 6:07 AM, o1bigtenor wrote: On Tue, Apr 20, 2021 at 6:26 PM Terry Reedy wrote: On 4/20/2021 4:32 AM, Alan Gauld via Python-list wrote: We see the same trend on the tutor list, traffic has dropped off by a factor of 3-5 times what it was at its peak. And the questions are

Re: do ya still use python?

2021-04-20 Thread Terry Reedy
modules and such. I suspect that at least some such questions have good answers on StackOverflow that questioners could profitably read first. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: do ya still use python?

2021-04-20 Thread Terry Reedy
why bother? -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Repair Install of 64 bit python

2021-04-17 Thread Terry Reedy
ot; form is recommended: it definitely installs in the Python you'd be running. It requires that pip itself be installed for pythonx, which can be ensured with "pythonx -m ensurepip". -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: port to PDOS (especially mainframe)

2021-04-17 Thread Terry Reedy
until fairly recently to be portable across major systems, including Windows with MS Visual C. At least some C99 features are used now and more are being comtemplated. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: translating external files type thing

2021-04-13 Thread Terry Reedy
estion is understandable Thanks -- https://mail.python.org/mailman/listinfo/python-list -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: googletrans in python

2021-04-12 Thread Terry Reedy
On 4/12/2021 12:48 PM, Quentin Bock wrote: Can someone explain the basics of googletrans in python? You most likely want to install https://pypi.org/project/googletrans/ -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Style qeustion: Multiple return values

2021-04-12 Thread Terry Reedy
. Parentheses are for grouping (and separation from surrounding code). () and (1,) (can be though of as) group(ing) the a zero-width space and one-comma pair respectively and separate them from the rest of the code. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: PyWin32 : When using Microsoft Word in code , opening it doesn't work

2021-04-08 Thread Terry Reedy
made the request 1 month back.I did that atleast thrice. So I 'm stuck. Next time, help youself and us and say this ;-). -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: PyWin32 : When using Microsoft Word in code , opening it doesn't work

2021-04-08 Thread Terry Reedy
On 4/8/2021 6:22 PM, VISHESH MANGLA wrote: Please help with this . https://github.com/mhammond/pywin32/issues/1689 Closed by Mark Hammond as a support requrest rather than a bug report or feature request. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Yield after the return in Python function.

2021-04-05 Thread Terry Reedy
On 4/5/2021 3:32 PM, Chris Angelico wrote: On Tue, Apr 6, 2021 at 5:14 AM Terry Reedy wrote: Python *could* do the same for expresssions: load 'a' (in this case) once into a register or stack slot and use that value consistently throughout the expression. Replacing the eva

Re: Yield after the return in Python function.

2021-04-05 Thread Terry Reedy
On 4/5/2021 1:53 PM, Chris Angelico wrote: On Tue, Apr 6, 2021 at 3:46 AM Terry Reedy wrote: *While 'a and not a' == False in logic, in Python it might raise NameError. But that would still mean that it is never True, making 'yield 0' still unreachable. When I wrote tha

Re: Yield after the return in Python function.

2021-04-05 Thread Terry Reedy
nd less obvious but still equivalent expression, such and 'a and and not a'*. Is 'log(a) = 0' tautologically False? *While 'a and not a' == False in logic, in Python it might raise NameError. But that would still mean that it is never True, making 'yield 0' still unreachable. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: About \033[m

2021-04-04 Thread Terry Reedy
quot;)) or print(f"\033[7;30;43m{"Programac,ao Python":^40}\033[m") -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: not able to download PyAudio

2021-04-02 Thread Terry Reedy
the top of the page. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Unable to find 'edit with ide' option in the Context menu

2021-03-31 Thread Terry Reedy
this doesn't solves my problem, please help! Did you check (or leave checked) [x] Install tkinter and IDLE? Can you start IDLE otherwise? -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Code Formatter Questions

2021-03-30 Thread Terry Reedy
guing about whether this format is [more] right than that! I am currently the main IDLE maintainer and spend essentially no time arguing over format. If a contribution is within the bounderies of PEP 8, that is good enough for me. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/p

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-03-28 Thread Terry Reedy
. (If it works, you can keep the patched version ;-). For many issues, reviews are the bottleneck for getting fixes released. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-03-27 Thread Terry Reedy
's already been reported so I'm adding to this issue: https://bugs.python.org/issue43433 You added a PR, which is great, but useless unless a currently active coredev reviews and merges. I requested such from the author and merger of the apparently offending commit. -- Terry Jan Reedy -

Re: Access to python37_d.lib

2021-03-27 Thread Terry Reedy
don't know if including 'debug files' includes these or not. You can check in your /lib. Is matplotlib-cpp possibly installed with its own debug build of python37? Or using some other installed python on your system? -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: python documentation

2021-03-27 Thread Terry Reedy
en your subversions and belonging packages. I don't understand 'subversions' and 'belonging packages'? I understand 'incompatibities' in general but not what you mean specifically. I don't know of any evidence that there are increased within, say, 3.8 or 3

Re: python documentation

2021-03-27 Thread Terry Reedy
2azFsFjBVEwVMg I don't know if the unknown to me page author(s) would consider this a 'packaging' at they intend the term to mean. May I ask - how can I do that best? Thanks in advance and At the bottom of the page is "Submit Website Bug" linked to h

Re: python documentation

2021-03-27 Thread Terry Reedy
ly is not my decision. AFAIK, none of the website maintainers post on this list. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-19 Thread Terry Reedy
'.'. Overall, the only rule is no rule. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: IDLE python

2021-03-13 Thread Terry Reedy
Python version? How did you try to start IDLE? What happens with "python -m idlelib -e" on a command line (where 'python' is the word to start 3.x)? -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: REPL peculiarity

2021-03-11 Thread Terry Reedy
ef f(): ... a = 3 is more typical. A dedented statement looks like a buggy continuation line. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Application problems

2021-03-11 Thread Terry Reedy
startup error. How did you try to start IDLE and what 'startup error' did you see. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: "unexpected argument"

2021-03-09 Thread Terry Reedy
.type first. Here you do not. At some point, you asked for the key for a non-key event. Put this statement under the keyup or keydown event type check, depending on when you want fire to happen. if event.type == pygame.KEYUP: if event.key == pygame.K_LEFT or event.key == py

Re: Button placement

2021-03-09 Thread Terry Reedy
clearly what you want/expect and what you are getting and why you are unhappy. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Please don't feed the trolls

2021-03-07 Thread Terry Reedy
on a boat one a Mexican river/lagoon.) Please unhook yourself and swim away. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem with printing statement when condition is false

2021-03-05 Thread Terry Reedy
On 3/4/2021 4:28 PM, Terry Reedy wrote: Quentin privately sent me 12 lines (which should have been posted here instead), which can be reduced to the following 4 that exhibit his bug. if a == b:     print('correct')     if a != b:     print('incorrect') The bug is

Re: Problem with printing statement when condition is false

2021-03-04 Thread Terry Reedy
On 3/4/2021 3:15 PM, Terry Reedy wrote: On 3/4/2021 12:10 PM, Quentin Bock wrote: I won't paste the code into this because it's 164 lines so I will attach a file copy, The alternative to posting too much is to reduce your code to the minimum needed to exhibit the behavior you want

Re: Problem with printing statement when condition is false

2021-03-04 Thread Terry Reedy
to you the solution. It will certainly make it easier for anyone else to help you and will make any answer more useful to other readers. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Why assert is not a function?

2021-03-03 Thread Terry Reedy
p the message expression to delay evaluation. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: error of opening Python

2021-02-26 Thread Terry Reedy
ts" or "license" for more information. The problem string is "win32". No. 'win32' is a historical artifact. You should be able to open a terminal Window and execute "uname -r". Not on Windows. Please don't spew misleading garbage that will only confuse the new user on a different operating system. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter long-running window freezes

2021-02-25 Thread Terry Reedy
On 2/24/2021 6:53 PM, John O'Hagan wrote: On Wed, 24 Feb 2021 11:03:30 -0500 Terry Reedy wrote: On 2/24/2021 6:35 AM, John O'Hagan wrote: [...] I am trying this out on Windows 10, with a wider label (so I can move the window) and a button that changes when pressed, and a sequenti

Re: Tkinter long-running window freezes

2021-02-24 Thread Terry Reedy
eezes. The process uses about 26 Mb of memory at first, and this gradually increases to around 30 or so by the time it freezes. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Idle Python issue

2021-02-24 Thread Terry Reedy
the string (eg: 'the smile'). You may notice problems with editing. Is there any way to prevent this from happening? It is an annoying problem. Help the tcl/tk people to add full unicode support to tcl/tk. ;-) They know it is needed. I don't know what their timetable is now. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Deleting Python 3.8.5

2021-02-22 Thread Terry Reedy
files for 3.8.5 still exist algong with 3.9.2 can someone help me? The 3.8 directory should still be there if you added anything thing, such as to site-packages, but the stuff added by the installer should be gone. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to subtract 3 from every digit of a number?

2021-02-20 Thread Terry Reedy
a string. Indeed, the dict could be the char-char mapping above created with the dict comprehension. Also, the resulting dict maps unicode ordinals to unicode ordinals, rather than chars to chars, because at the C level, a string *is* a sequence of unsigned ints with a PyObject wrapper. >>> lookup3 {48: 55, 49: 56, 50: 57, 51: 48, 52: 49, 53: 50, 54: 51, 55: 52, 56: 53, 57: 54} In Python, this is {ord(a):ord(b) for a, b in zip('0123456789', '7890123456')} -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: use set notation for repr of dict_keys?

2021-02-20 Thread Terry Reedy
dict keys are insertion ordered, I think the list brackets suggesting a significant key order is better. There is also the issue that representation changes can break code and therefore need substantial reason. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: I need some help interpreting this error

2021-02-17 Thread Terry Reedy
dr["subject"] = msg.get("Subject", "unknown") ... if sbstrip in msghdr["subject"]: Replace with sub = msghdr["subject"] if 'Header' in str(sub.__class__): # Or import email.message.class and use isinstance

Re: IDLE

2021-02-16 Thread Terry Reedy
what version of what operating system, the python versions you have and where obtained, whether you can run python itself, and how you tried run IDLE and open a file. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: New Python implementation

2021-02-13 Thread Terry Reedy
On 2/12/2021 4:42 PM, Mr Flibble wrote: On 12/02/2021 02:45, Terry Reedy wrote: On 2/11/2021 5:33 PM, Mr Flibble wrote: On 11/02/2021 22:25, Dan Stromberg wrote: On Thu, Feb 11, 2021 at 2:00 PM Mr Flibble wrote: On 11/02/2021 21:13, Dan Stromberg wrote: Does your project have a name yet

Re: mutating a deque whilst iterating over it

2021-02-12 Thread Terry Reedy
ntimeError: deque mutated during iteration -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: New Python implementation

2021-02-12 Thread Terry Reedy
thon program, why do you deny it? -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: @unittest.skip doesn't print anything in Python <= 3.7

2021-02-12 Thread Terry Reedy
8 and look changelog, linked in the first paragraph, for 'unittest' issues. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Running Jupyter Notebook

2021-02-10 Thread Terry Reedy
r anything in C:\Windows is a bad idea since you might accidentally change something so something no longer works properly. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   10   >