Re: There has to be a better way to split this string!

2016-02-15 Thread Emile van Sebille
On 2/9/2016 10:50 PM, Cameron Simpson wrote: On 10Feb2016 07:34, srinivas devaki wrote: PS: trying to read mailing list when you are half woke, is a bad idea and trying reply to it is even bad idea. Regrettably, when one is half awake one is unable to realise what a bad idea it may be:-)

Re: There has to be a better way to split this string!

2016-02-09 Thread Cameron Simpson
On 10Feb2016 07:34, srinivas devaki wrote: On Feb 10, 2016 7:23 AM, "srinivas devaki" wrote: On Feb 10, 2016 6:56 AM, "Anthony Papillion" wrote: > I am using datetime.now() to create a unique version of a filename. > When the final file is named, it will look something like: > myfile-2015-0

Re: There has to be a better way to split this string!

2016-02-09 Thread srinivas devaki
On Feb 10, 2016 7:23 AM, "srinivas devaki" wrote: > > > On Feb 10, 2016 6:56 AM, "Anthony Papillion" wrote: > > > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA512 > > > > Hello Everyone, > > > > I am using datetime.now() to create a unique version of a filename. > > When the final file is na

Re: There has to be a better way to split this string!

2016-02-09 Thread Tim Chase
On 2016-02-09 19:26, Anthony Papillion wrote: > myfile-2015-02-09-19-08-45-4223 > > Notice I'm replacing all of the "."'s, " "'s, and ":"'s returned by > datetime.now() with "-"'s. I'm doing that using the following code > but it's freaking ugly and I KNOW there is a better way to do it. I > just

Re: There has to be a better way to split this string!

2016-02-09 Thread srinivas devaki
On Feb 10, 2016 6:56 AM, "Anthony Papillion" wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > Hello Everyone, > > I am using datetime.now() to create a unique version of a filename. > When the final file is named, it will look something like: > > myfile-2015-02-09-19-08-45-4223 >

Re: There has to be a better way to split this string!

2016-02-09 Thread Oscar Benjamin
On 10 February 2016 at 01:26, Anthony Papillion wrote: > I am using datetime.now() to create a unique version of a filename. > When the final file is named, it will look something like: > > myfile-2015-02-09-19-08-45-4223 > > Notice I'm replacing all of the "."'s, " "'s, and ":"'s returned by > da

Re: There has to be a better way to split this string!

2016-02-09 Thread Chris Angelico
On Wed, Feb 10, 2016 at 12:26 PM, Anthony Papillion wrote: > I am using datetime.now() to create a unique version of a filename. First off, be aware that this won't make a unique file name. But if you're okay with that (deal with collisions somehow), then sure. > When the final file is named, it