[Bf-committers] Scripts repository
Douglas Bischoff
bf-committers@blender.org
Wed, 21 Jan 2004 12:15:58 -0500
On Jan 21, 2004, at 11:36, Willian Padovani Germano wrote:
> About the dir separator, there's this old piece of code at
> blender/python/api2_2x/Sys.c , the Blender.sys module:
>
> #ifdef WIN32
> sep = Py_BuildValue("s", "\\");
> #else
> sep = Py_BuildValue("s", "/");
> #endif
Interesting! yes, the / separator is current OS X (the ":" was from OS
9 days and no longer needed for Blender's purposes). I would suppose
then that the folks writing scripts (or checking to be sure that
they're cross-platform) mightn't know about this. I rarely see sys.sep
in code, but often see a lot of hard-coded paths with Windows-style
slashes!
> But your point reminds me of another: some scripts require full Python
> installations, others do not. This is also something that will need a
> little more research, to see if they really need more than basic
> Blender -- simple missing functionality can always be added to BPython.
Good point, I'm not sure how to address this one. OS X's half-assed
installation (pardon my ire) on 10.2.X was Python 2.2, but the one with
OS X 10.3.X is 2.3 which is a problem. You MUST do a full install of
2.2 Python on OS X in order for any scripts to work as far as I'm
aware.
> The return of the file selector made standard pymodule 'os' not
> necessary for scripts that only wanted that functionality, for example.
Some scripts don't use the hard-coded paths for file selection, but
rather to write out files to standard locations. Is the file selector
module finished? That, too, may not be widely public knowledge!
Thanks for all the work on Blender Python!! It's come a LONG way since
the old "freeze" days...
-Bischofftep