os.path : explain behavior?


i adore python since comes batteries included, i built-in functions, lot, unwashed office me.



i have always controlling happily os.path way understanding record route nonetheless recently i finished adult astonishing law python 2.5 underneath ubuntu linux, while traffic twine paint windows record paths :



filepath = r"c:\ttemp\filepa~1.exe"
print os.path.basename(filepath)
'c:\\ttemp\\filepa~1.exe']
print os.path.splitdrive(filepath)
('', 'c:\ttemp\\filepa~1.exe')


wtf ?



it ends adult same proceed filepath = u"c:\ttemp\filepa~1.exe" filepath = "c:\ttemp\filepa~1.exe".



do have thought ? ubuntu utf8 nonetheless i don't feel something it. maybe python exercise messed adult nonetheless i perform any sole tweak i remember.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?