[Bf-python] problem : Blender.sys.basename on win32 system
Willian Padovani Germano
wgermano at ig.com.br
Thu Jan 13 03:31:29 CET 2005
jms wrote:
> # Blender.sys.basename on nt system, win xp pro, gives a false result
> import Blender
> # if mtextures[0].tex.type == Texture.Types.IMAGE and
> (mtextures[0].texco & Texture.TexCo.UV):
> # basename=Blender.sys.basename(mtextures[0].tex.image.filename)
> # print basename
> # 'f:/image.jpg'
> print Blender.sys.basename('f:\\image.jpg')
> print Blender.sys.basename('f:/image.jpg')
Hi Jean-Michel,
I can't test that here under linux and looking at the code I remembered
it checks for the system's separating char (so '\' on win and '/'
everywhere else).
Could you or someone else try this function (Blender.sys.basename(path))
with a few examples and send us the exact output so we can see what goes
wrong (I don't know what win systems may be passing to it -- '\\', '\',
...) ?
Thanks,
--
Willian
More information about the Bf-python
mailing list