Re: get a copy of a string leaving original intact

2005-10-22 Thread Fredrik Lundh
"Bell, Kevin" wrote: > I ended up slicing my string into a new one, rather than trying to have > a copy of the string to alter in one case, or leave intact in another > case. given that you cannot modify strings in place in Python, that comment probably doesn't match what your code really did...

RE: get a copy of a string leaving original intact

2005-10-21 Thread Bell, Kevin
Lundh Sent: Friday, October 21, 2005 2:10 AM To: python-list@python.org Subject: Re: get a copy of a string leaving original intact "Bell, Kevin" wrote: > I'm having trouble with something that seems like it should be simple. > > I need to copy a file, say "abc-1.tif&

Re: get a copy of a string leaving original intact

2005-10-21 Thread Fredrik Lundh
"Bell, Kevin" wrote: > I'm having trouble with something that seems like it should be simple. > > I need to copy a file, say "abc-1.tif" to another directory, but if it's > in there already, I need to transfer it named "abc-2.tif" but I'm going > about it all wrong. > > Here's what doesn't work: (

Re: get a copy of a string leaving original intact

2005-10-20 Thread Christoph Haas
On Thursday 20 October 2005 22:43, Bell, Kevin wrote: > I need to copy a file, say "abc-1.tif" to another directory, but if it's > in there already, I need to transfer it named "abc-2.tif" but I'm going > about it all wrong. What a coincidence... I stepped about this today: http://aspn.activestat

get a copy of a string leaving original intact

2005-10-20 Thread Bell, Kevin
I'm having trouble with something that seems like it should be simple. I need to copy a file, say "abc-1.tif" to another directory, but if it's in there already, I need to transfer it named "abc-2.tif" but I'm going about it all wrong. Here's what doesn't work: (I'll add the copy stuff from shuti