Python newbie question re Strings and integers

Miki miki.tebeka at
Fri Sep 19 01:35:48 CEST 2008

>     currentSymbol=filename[int(filenameStart),int(extensionStart)]
Should be
(change , to :)

You don't need to convert to int all the time, rfind will return an

Also you can use os.path for this

    from os.path import basename, splitext
    currentSymbol = splitext(basename(filename))[0]

Miki <miki.tebeka at>

More information about the Python-list mailing list