variable creation from a pathname

gimar paolo.marz at
Sun Feb 1 18:08:47 CET 2004

I wonder if there's a way to assign a value to the object obtained with:

from os.path import *
splitext(basename("c:\pyfiles\sample.txt"))[0]    -----> sample

and make it possible something like this, for example:

sample = 123

Thank you in advance.

More information about the Python-list mailing list