[Bf-python] Blender.sys.basename() different from os.path.basename() on Windows

Campbell Barton cbarton at metavr.com
Fri Mar 9 01:21:22 CET 2007


Blender's path functions are path dependant.
\ - win32, / other os's

interesting that the OS module works differently... It wouldnt be that 
hard to change blenders to work like os's

jmsoler at free.fr wrote:
> Selon Levi Schooley <bpycadmin at hhofministries.org>:
> 
>> Hello,
>>
>> I know this is a bit picky, but I just noticed that the following script
>> prints
>> two different results.
>>
>> # On Windows only
>> import Blender, os
>> print os.path.basename("foo/foo.py") # prints "foo.py"
>> print Blender.sys.basename("foo/foo.py") # prints "foo/foo.py" ???
>>
> 
> Try the bug tracker :
> http://projects.blender.org/tracker/?atid=125&group_id=9&func=browse
> 
> 
>> Is this expected behaviour? It's not a big problem since Blender comes
>> bundled
>> with the os module, but it would be a little more convenient if Blender.sys
>> worked "as expected." Blender.sys.dirname() has the same issue.
>>
> 
> In the next Blender, the os module will be no more bundled .
> on http://projects.blender.org/pipermail/bf-python/2007-March/thread.html#4609
> read the thread :
> "A python25.zip file is needed for the current CVS"
> 
> jms
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-python
> 


-- 
See MetaVR Visuals Used at the Combat Studies Institute
http://www.metavr.com/casestudies/baghdadviews.html

Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list