Documenting the Python Community

2020-11-02 Thread Abdur-Rahmaan Janhangeer
Greetings list, I have a project in mind to help document the Python community. It involves among others keeping a within reach info of user groups (name, location, contact) and checking activity status. Sending the mail to this list since i could not find a

Re: Find word by given characters

2020-11-02 Thread dn via Python-list
On 03/11/2020 13:13, duncan smith wrote: On 02/11/2020 19:09, dn wrote: On 02/11/2020 23:29, Bischoop wrote: On 2020-11-01, duncan smith wrote: But this generates the letters counts for each word. They only need to be generated once (outside the for loop). And using count requires iterating o

Re: Find word by given characters

2020-11-02 Thread dn via Python-list
On 03/11/2020 12:10, Bischoop wrote: On 2020-11-02, dn wrote: If you have a working Py2 version, once print-statements were changed into functions, what errors were thrown-up? That was almost 15 if no more years ago when I was learning then had a long break beacause Life :-) Got married, work

Re: Find word by given characters

2020-11-02 Thread duncan smith
On 02/11/2020 19:09, dn wrote: > On 02/11/2020 23:29, Bischoop wrote: >> On 2020-11-01, duncan smith wrote: >>> >>> But this generates the letters counts for each word. They only need to >>> be generated once (outside the for loop). And using count requires >>> iterating over the letters / wo

Re: Best way to determine user's screensize?

2020-11-02 Thread songbird
Grant Edwards wrote: > On 2020-11-01, songbird wrote: > >> to keep a program simple i made it to open in the center. > > That's not simple: it actually takes _extra_ work to do that. this was the first python3 program i wrote, i certainly do not know python3 or desktop application standards or

Re: Find word by given characters

2020-11-02 Thread Bischoop
On 2020-11-02, dn wrote: > > > If you have a working Py2 version, once print-statements were changed > into functions, what errors were thrown-up? > > That was almost 15 if no more years ago when I was learning then had a long break beacause Life :-) Got married, working as Chef, now have some mo

Re: Solaris 11 GUI framework

2020-11-02 Thread Igor Korot
Hi, On Mon, Nov 2, 2020, 5:02 PM Jay Braun wrote: > Thank you. I should have mentioned that I am looking for a Python GUI > framework. I neglected to mention that since this is a Python group. > Sorry. > Well, first 2 are python and base on gtk. Thank you. -- > https://mail.python.org/mail

Re: Solaris 11 GUI framework

2020-11-02 Thread Jay Braun
Thank you. I should have mentioned that I am looking for a Python GUI framework. I neglected to mention that since this is a Python group. Sorry. -- https://mail.python.org/mailman/listinfo/python-list

Re: Solaris 11 GUI framework

2020-11-02 Thread Igor Korot
Hi, On Mon, Nov 2, 2020, 3:57 PM Jay Braun wrote: > Looking for a GUI framework supported on Solaris 11. > Wxpython, pygtk, Java. Take you poison. Thank you. -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Solaris 11 GUI framework

2020-11-02 Thread Jay Braun
Looking for a GUI framework supported on Solaris 11. -- https://mail.python.org/mailman/listinfo/python-list

Re: Post request and encoding

2020-11-02 Thread Grant Edwards
On 2020-11-02, Ethan Furman wrote: > On 11/2/20 9:32 AM, Karsten Hilbert wrote: > >> because .encode() does not operate in-place. > > Yeah, none of the string operations do, and it's embarrassing how > many times that still bites me. :-/ I've been writing Python for a little over 20 years. In an

Re: Post request and encoding

2020-11-02 Thread Variable Starlight
Thanks, I now learned the lesson. 👍 Den mån 2 nov. 2020 18:58Ethan Furman skrev: > On 11/2/20 9:32 AM, Karsten Hilbert wrote: > > > because .encode() does not operate in-place. > > Yeah, none of the string operations do, and it's embarrassing how many > times that still bites me. :-/ > > -- > ~

Re: Post request and encoding

2020-11-02 Thread Variable Starlight
No worries ☺ Den mån 2 nov. 2020 19:05Karsten Hilbert skrev: > On Mon, Nov 02, 2020 at 06:43:20PM +0100, Hernán De Angelis wrote: > > > I see, my mistake was (tacitly) assuming that encode() could work in > place. > > > > Now I see that it should work in a previous line as you wrote. > > > > Tha

Re: Find word by given characters

2020-11-02 Thread dn via Python-list
On 02/11/2020 23:29, Bischoop wrote: On 2020-11-01, duncan smith wrote: But this generates the letters counts for each word. They only need to be generated once (outside the for loop). And using count requires iterating over the letters / words for each x in letters (rather than once). For a

Re: Post request and encoding

2020-11-02 Thread Karsten Hilbert
On Mon, Nov 02, 2020 at 06:43:20PM +0100, Hernán De Angelis wrote: > I see, my mistake was (tacitly) assuming that encode() could work in place. > > Now I see that it should work in a previous line as you wrote. > > Thank you! Sure, and excuse my perhaps slightly terse tone in that earlier mail .

Re: Post request and encoding

2020-11-02 Thread Ethan Furman
On 11/2/20 9:32 AM, Karsten Hilbert wrote: because .encode() does not operate in-place. Yeah, none of the string operations do, and it's embarrassing how many times that still bites me. :-/ -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Post request and encoding

2020-11-02 Thread Hernán De Angelis
I see, my mistake was (tacitly) assuming that encode() could work in place. Now I see that it should work in a previous line as you wrote. Thank you! /H. On 2020-11-02 18:32, Karsten Hilbert wrote: On Mon, Nov 02, 2020 at 06:21:15PM +0100, Hernán De Angelis wrote: For the record: Just repl

Re: Post request and encoding

2020-11-02 Thread Karsten Hilbert
On Mon, Nov 02, 2020 at 06:21:15PM +0100, Hernán De Angelis wrote: For the record: > Just reply to myself and whoever might find this useful. > > encode() must be done within the request call: Nope (but it can, as you showed). > header = {'Content-type':'application/xml', 'charset':'UTF-8'} > r

Re: Post request and encoding

2020-11-02 Thread Chris Angelico
On Tue, Nov 3, 2020 at 4:22 AM Hernán De Angelis wrote: > > Just reply to myself and whoever might find this useful. > > encode() must be done within the request call: > > header = {'Content-type':'application/xml', 'charset':'UTF-8'} > response = requests.post(server, data=request.encode('utf-8')

Re: Post request and encoding

2020-11-02 Thread Hernán De Angelis
Just reply to myself and whoever might find this useful. encode() must be done within the request call: header = {'Content-type':'application/xml', 'charset':'UTF-8'} response = requests.post(server, data=request.encode('utf-8'), headers=header) not in a previous separate line as I did. Now

Re: Best way to determine user's screensize?

2020-11-02 Thread Grant Edwards
On 2020-11-01, songbird wrote: > certainly it isn't but it is my game and i kept it simple. if > people don't like it then they can find something else to play. i'm > good with that, but the next time i get back to making changes i'll > see what i can figure out for saving the location where so

Re: Best way to determine user's screensize?

2020-11-02 Thread Grant Edwards
On 2020-11-01, songbird wrote: > to keep a program simple i made it to open in the center. That's not simple: it actually takes _extra_ work to do that. > if i ever get back to it i'll have to figure out how to ask > the windowing system what it wants to do for placement I've never heard of do

Post request and encoding

2020-11-02 Thread Hernán De Angelis
Hi everyone, I am writing a program that sends a post request to a server. The post request may include keywords with Swedish characters (åöä). I noticed that requests that include strings without those characters return a useful expected response. On the other hand, posts including those ch

Re: Find word by given characters

2020-11-02 Thread Bischoop
On 2020-11-01, duncan smith wrote: >> > > But this generates the letters counts for each word. They only need to > be generated once (outside the for loop). And using count requires > iterating over the letters / words for each x in letters (rather than > once). For a large enough collection of w