Re: [Tutor] How to convert string to date time format?

2019-07-23 Thread C W
Thanks a lot Steven. The %f is what I was missing. The "-08:00" is the UTC timezone, which is California, USA, which I believe is %z. Thanks! On Sat, Jul 20, 2019 at 7:50 PM Steven D'Aprano wrote: > On Fri, Jul 19, 2019 at 10:44:36PM -0400, C W wrote: > > Hello all, > > > > I have a date time

Re: [Tutor] multiprocessing: getting data back from the processes

2019-07-23 Thread Oscar Benjamin
On Tue, 23 Jul 2019 at 00:29, Mats Wichmann wrote: > > I've got a scenario where I need to pass data in both directions of a > multiprocessing program. > So... what else should I be trying to make this a little cleaner? I think if possible it is best to set these things up as an acyclic pipeline

[Tutor] Python Generator expressions

2019-07-23 Thread Animesh Bhadra
Hi All, Need one help in understanding generator expression/comprehensions. This is my sample code. # This code creates a generator and not a tuple comprehensions. my_square =(num *num fornum inrange(11)) print(my_square) # at 0x7f3c838c0ca8> # We can iterate over the square generator like thi

[Tutor] a par2 creator and verification program

2019-07-23 Thread Adam Gold
Hello everyone. I'm thinking through a short program I want to write that will 'par2'/generate ECCs for all of my work files which branch out from a single directory and number approximately 15,000. Specifically: 1) day one: - create a mirror copy of the directory tree empty of all files (the

Re: [Tutor] Python Generator expressions

2019-07-23 Thread David L Neil
Hi Animesh, Unfortunately the list server/email has removed the formatting from your sample, but no matter... On 24/07/19 5:06 AM, Animesh Bhadra wrote: # This code creates a generator and not a tuple comprehensions. my_square =(num *num fornum inrange(11)) print(my_square) # at 0x7f3c838c0c

Re: [Tutor] Python Generator expressions

2019-07-23 Thread Mats Wichmann
On 7/23/19 11:06 AM, Animesh Bhadra wrote: > Hi All, > > Need one help in understanding generator expression/comprehensions. > > This is my sample code. > > # This code creates a generator and not a tuple comprehensions. > my_square =(num *num fornum inrange(11)) > print(my_square) # at 0x7f3c8

Re: [Tutor] Python Generator expressions

2019-07-23 Thread Steven D'Aprano
On Tue, Jul 23, 2019 at 10:36:01PM +0530, Animesh Bhadra wrote: > Hi All, > > Need one help in understanding generator expression/comprehensions. > > This is my sample code. Lots of missing spaces in your code! Don't forget to hit the space bar between words :-) Also missing indentation, which

Re: [Tutor] Python Generator expressions

2019-07-23 Thread Steven D'Aprano
On Wed, Jul 24, 2019 at 11:26:26AM +1200, David L Neil wrote: > Clarifying the difference/similarity in appearance between a generator > expression and a tuple, it might help to think that it is the comma(s) > which make it a tuple! David makes an excellent point here. Except for the special ca