Joseph Quigley wrote:
> This suggestion:
> 
> date = files[x]
>            Data.year = date[2:4]
>            Data.month = date[4:6]
>            Data.day = date[6:8]
> 
> 
> Doesn't work because DspImage needs a concatenated string. (you'll see 
> a  07/28/['5'] instead of the current 07/28/05.

Did you try it? Presuming your file names look something like this:
 >>> date = 'xx051015.jpg'

Taking a slice of a string gives another string:
 >>> date[2:4]
'05'

Which is exactly the same as turning the string into a list (of strings) and 
concatenating:
 >>> datel=list(date)
 >>> datel[2] + datel[3]
'05'

Kent

PS Please reply on list so everyone can benefit

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to