So if we asc AI what it recommend for spliting name and extension of file. So what ever it say, here is my, better answer...:
#
def splitFileNameExtension(text):
a = text.split(".")
r = {
'name' :'', # somename
'extension':'', # php,js...
}
if len(a)>=2:
r['extension'] = a[len(a)-1]
del(a[len(a)-1])
r['name'] = "".join(a)
return r
i guess so. :)