I see. Should be "encoding". Thanks.
/H.
On 2020-11-03 19:30, Dieter Maurer wrote:
Hernán De Angelis wrote at 2020-11-2 10:06 +0100:
...
My request has the form:
header = {'Content-type':'application/xml', 'charset':'utf-8'}
Not your problem (which you have already resolved) but:
`charset` i
On Tue, Nov 3, 2020 at 3:27 AM Frank Millman wrote:
> It works, and it does look neater. But I want to start some background
> tasks before starting the server, and cancel them on Ctrl+C.
>
> Using the 'old' method, I can wrap 'loop.run_forever()' in a
> try/except/finally, check for KeyboardInt
Am 03.11.20 um 23:34 schrieb Dennis Lee Bieber:
Out of curiosity, does Python on Linux honor the .pyw extension?
On Windows, .pyw indicates a Python program that implements a GUI and
will NOT make use of console (stdin/stdout/stderr).
On Linux, there is no such distinction. O
Duncan, my comments below yours at end.
---YOURS---
The Counter approach only requires iterating over the letters once to
construct the letters bag, then each word once to create the relevant word
bag. After that it's (at worst) a couple of lookups and a comparison for
each unique character in let
On 03/11/2020 22:14, Avi Gross wrote:
> I, too, have wondered what exactly the point was of the required
> functionality for SCRABBLE but note you can extend a current word so
> additional letters may be available in a game but only if they are an exact
> fit to put before, after, or in middle of y
On 2020-11-04, Quentin Bock wrote:
> So, I'm newer to Python and I'm messing around with math functions and
> multiplication, etc. here is my line of code:
>
> def multiply(numbers):
> total = 1
> for x in numbers:
> total *= x
> return total
> print(mu
>
> When I run this, my answer is 8 but it should be 336 can some help ._.
>
Looks like you are returning from inside the loop.
Skip
>
--
https://mail.python.org/mailman/listinfo/python-list
So, I'm newer to Python and I'm messing around with math functions and
multiplication, etc. here is my line of code:
def multiply(numbers):
total = 1
for x in numbers:
total *= x
return total
print(multiply((8, 2, 3, -1, 7)))
When I run this, my answer
On 03/11/2020 23:35, Bischoop wrote:
> On 2020-11-03, duncan smith wrote:
>>>
>>
> from collections import Counter
> letters = 'att'
> letter_counts = Counter(letters)
> word = 'tolerate'
> wd_counts = Counter(word)
> for char, cnt in letter_counts.items():
>> print (c
On 2020-11-03 20:11, David Burnette wrote:
On Wednesday, April 18, 2007 at 12:33:24 AM UTC-7, Chris wrote:
Hi,
I'm puzzled by some strange behavior when my Python/Tkinter
application quits (on linux): the terminal from which I started Python
is messed up.
If start up python, then import the code
On 04/11/2020 12:27, Bischoop wrote:
On 2020-11-03, Chris Angelico wrote:
This seems strangely backwards for a Scrabble game. Normally you would
have a set of available tiles, and you have to form a word using only
those tiles, but it doesn't necessarily have to use them all. You seem
to have
On 2020-11-03, duncan smith wrote:
>>
>
from collections import Counter
letters = 'att'
letter_counts = Counter(letters)
word = 'tolerate'
wd_counts = Counter(word)
for char, cnt in letter_counts.items():
> print (cnt == wd_counts[char])
>
>
> True
> Tru
On 2020-11-03, Chris Angelico wrote:
>
> This seems strangely backwards for a Scrabble game. Normally you would
> have a set of available tiles, and you have to form a word using only
> those tiles, but it doesn't necessarily have to use them all. You seem
> to have something where you must use al
I, too, have wondered what exactly the point was of the required
functionality for SCRABBLE but note you can extend a current word so
additional letters may be available in a game but only if they are an exact
fit to put before, after, or in middle of your word.
But this seems to be a fairly simp
On Wednesday, April 18, 2007 at 12:33:24 AM UTC-7, Chris wrote:
> Hi,
> I'm puzzled by some strange behavior when my Python/Tkinter
> application quits (on linux): the terminal from which I started Python
> is messed up.
> If start up python, then import the code below, then start the program
> wit
Hernán De Angelis wrote at 2020-11-2 10:06 +0100:
> ...
>My request has the form:
>
>header = {'Content-type':'application/xml', 'charset':'utf-8'}
Not your problem (which you have already resolved) but:
`charset` is not an individual header but a parameter
for the `Content-Type` header. For `xml`
The engines of the secret release manager machine have finished producing a
new pre-release. Go get it here:
https://www.python.org/downloads/release/python-3100a2/
*Major new features of the 3.10 series, compared to 3.9*
Python 3.10 is still in development. This releasee, 3.10.0a2 is the secon
On 2020-11-02, Igor Korot wrote:
> On Mon, Nov 2, 2020, 3:57 PM Jay Braun wrote:
>
>> Looking for a GUI framework supported on Solaris 11.
>
> Wxpython, pygtk, Java.
I wouldn't start a new project with pygtk. It's obsolete (Python2
only) and is no longer supported/available on some platforms. It
On Wed, Nov 4, 2020 at 1:11 AM Bischoop wrote:
> Let me clarify what I want to do:
> We all know Scrabble game.
> there's a file with Dictionary containing word in each line, the idea is
> to input some letters for example mentioned earlier: att, the script
> supposed to find all words in which le
On 03/11/2020 14:06, Bischoop wrote:
> On 2020-11-03, dn wrote:
>>
>>
>> The (full) specs are not clear. There's certainly room for
>> misunderstanding. I'd be happier if I could 'see' a full spec or
>> recognise a practical application, because then we'd be better able to
>> discuss facts. Mea
On Sun, 1 Nov 2020 15:31:57 - (UTC), Grant Edwards wrote:
>
> I have no objection to saving the most recent window size and using
> that on the next startup, but I hate applications that force the
> _location_ of the window. I've configured my window manager to open
> windows where I want them
tcl/tk supports unicode chars in the BMP (Basic Multilingual Plane,
utf-8 encoded with 1-3 bytes). The presence of chars in other plains
('astral', utf-8 encoded with 4 bytes, I believe) in a tkinter Text
widget messages up *editing*, but they can sometimes be displayed with
appropriate glyphs
Bischoop writes:
> Let me clarify what I want to do:
> We all know Scrabble game.
> there's a file with Dictionary containing word in each line, the idea is
> to input some letters for example mentioned earlier: att, the script
> supposed to find all words in which letters: 'a','t','t' occur and
On 2020-11-03, dn wrote:
>
>
> The (full) specs are not clear. There's certainly room for
> misunderstanding. I'd be happier if I could 'see' a full spec or
> recognise a practical application, because then we'd be better able to
> discuss facts. Meantime, we try to help with what we have been
Hi all
My app runs an HTTP server using asyncio. A lot of the code dates back
to Python 3.4, and I am trying to bring it up to date. There is one
aspect I do not understand.
The 'old' way looks like this -
import asyncio
def main():
loop = asyncio.get_event_loop()
se
25 matches
Mail list logo