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: [SOLVED] There has to be a better way to split this string!

2016-02-09 Thread Chris Kaynor
On Tue, Feb 9, 2016 at 5:58 PM, Anthony Papillion wrote: > > On 02/09/2016 07:47 PM, Ben Finney wrote: > > Anthony Papillion writes: > > > >> On 02/09/2016 07:26 PM, Anthony Papillion wrote: > >>> I am using datetime.now() to create a unique version of a filename. > >>> […] > >> > >> Found the so

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: [SOLVED] There has to be a better way to split this string!

2016-02-09 Thread Anthony Papillion
On 02/09/2016 07:47 PM, Ben Finney wrote: > Anthony Papillion writes: > >> On 02/09/2016 07:26 PM, Anthony Papillion wrote: >>> I am using datetime.now() to create a unique version of a filename. >>> […] >> >> Found the solution in strftime(). Exactly what I was looking for. > > For the task of

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: [SOLVED] There has to be a better way to split this string!

2016-02-09 Thread Ben Finney
Anthony Papillion writes: > On 02/09/2016 07:26 PM, Anthony Papillion wrote: > > I am using datetime.now() to create a unique version of a filename. > > […] > > Found the solution in strftime(). Exactly what I was looking for. For the task of making a unique filename, you should also consider th

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: [SOLVED] There has to be a better way to split this string!

2016-02-09 Thread Anthony Papillion
On 02/09/2016 07:26 PM, Anthony Papillion wrote: > 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 > > Notice I'm replacing all of the "."'s, " "'s, and ":"'s

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

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

2016-02-09 Thread Anthony Papillion
-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 Notice I'm replacing all of the "."'s, " "'s, and ":"'s returned by date