re
Eric Texier
erict at millfilm.co.uk
Tue May 28 14:34:33 EDT 2002
Well, I am not completly new at python but some module (no mater what
language: it started with sed)
are impossible to get a good grab on:
I am trying to do replace '#' with a number in string with some control
over the padding:
a = 'echo file#.sgi file#~3.sgi file#~5*2.sgi'
ex: with 3
newString = "file3.sgi file003.sgi file00006.sgi"
# -> number
#~x -> number with some 0 in front for padding
#*2+3 -> number * 2 + 3 etc...
If this is trivial for one of you, I will appreciate your help a lot.
Thanks.
More information about the Python-list
mailing list