variable creation from a pathname

gimar paolo.marz at aliceposta.it
Sun Feb 1 12:08:47 EST 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