Re: Most elegant way to do something N times

2019-12-22 Thread Python
Le 22/12/2019 à 23:50, Stefan Ram a écrit : Batuhan Taskaya writes: dont like this for _ in range(n): do() thing. Any suggestions? The participants of my beginner classes like to write: n * do() for that purpose, but usuallythis does not work as intended! What would work sometimes

Re: Most elegant way to do something N times

2019-12-22 Thread Tim Chase
On 2019-12-22 23:34, Batuhan Taskaya wrote: > I encounter with cases like doing a function 6 time with no > argument, or same arguments over and over or doing some structral > thing N times and I dont know how elegant I can express that to the > code. I dont know why but I dont like this > > for _

Re: Most elegant way to do something N times

2019-12-22 Thread Mirko via Python-list
Am 22.12.2019 um 21:34 schrieb Batuhan Taskaya: > I encounter with cases like doing a function 6 time with no argument, or > same arguments over and over or doing some structral thing N times and I > dont know how elegant I can express that to the code. I dont know why but I > dont like this for _

Re: Most elegant way to do something N times

2019-12-22 Thread Richard Damon
On 12/22/19 3:34 PM, Batuhan Taskaya wrote: > I encounter with cases like doing a function 6 time with no argument, or > same arguments over and over or doing some structral thing N times and I > dont know how elegant I can express that to the code. I dont know why but I > dont like this for _ in r

Most elegant way to do something N times

2019-12-22 Thread Batuhan Taskaya
I encounter with cases like doing a function 6 time with no argument, or same arguments over and over or doing some structral thing N times and I dont know how elegant I can express that to the code. I dont know why but I dont like this for _ in range(n): do() thing. Any suggestions? -- https://ma

Re: More efficient/elegant branching

2019-12-22 Thread DL Neil via Python-list
On 11/12/19 1:07 AM, Daniel Haude wrote: Hello Neil, thanks for the detailed answer. Question: are there other people/factors who/which should be regarded as more important than the linter's opinion? Yes. Mine. Um, see below... (unless humor) I was just puzzled at the linter's output (took

Re: Transfer a file to httpserver via POST command from curl

2019-12-22 Thread Chris Angelico
On Mon, Dec 23, 2019 at 4:20 AM wrote: > > On Wed, 18 Dec 2019 04:52:33 +1100 > Chris Angelico wrote: > > > On Wed, Dec 18, 2019 at 4:45 AM wrote: > > > BTW, the canonical way to upload files via http is PUT, not POST. > > > You might want to look into that, but here it is off-topic. > > > > Cit

Re: Transfer a file to httpserver via POST command from curl

2019-12-22 Thread musbur
On Wed, 18 Dec 2019 04:52:33 +1100 Chris Angelico wrote: > On Wed, Dec 18, 2019 at 4:45 AM wrote: > > BTW, the canonical way to upload files via http is PUT, not POST. > > You might want to look into that, but here it is off-topic. > > Citation needed. https://tools.ietf.org/html/rfc2616#pag

Execute python script from VB6 to display Outlook Window

2019-12-22 Thread wojtek . dominicana
I have to prepare e-mail in python (e-mail address, body html, attachments etc.) and show Outlook window for user who will check everything and correct if necessary and will be able to send it. My script work well : o = win32com.client.Dispatch("Outlook.Application") Msg = o.CreateItem(0) Msg.T

Re: urllib unqoute providing string mismatch between string found using os.walk (Python3)

2019-12-22 Thread Ben Hearn
On Saturday, 21 December 2019 21:46:43 UTC, Ben Hearn wrote: > Hello all, > > I am having a bit of trouble with a string mismatch operation in my tool I am > writing. > > I am comparing a database collection or url quoted paths to the paths on the > users drive. > > These 2 paths look identic

Re: Unable to install "collect" via pip3

2019-12-22 Thread Mahmood Naderan via Python-list
Yes thank you. The package is not compatible with 3.x. Regards, Mahmood On Saturday, December 21, 2019, 1:40:29 AM GMT+3:30, Barry wrote: > On 20 Dec 2019, at 15:27, Mahmood Naderan via Python-list > wrote: > > Hi > > I can install collect with pip for python2.7 > $ pip install