[Bf-python] Current directory problem

Patrick Mullen saluk64007 at gmail.com
Thu Sep 30 07:06:16 CEST 2004


I know that this can be done with pure python:

import os
print os.curdir  #Will usually print "" or something
print os.path.abspath(os.curdir)  #prints the full path to the current directory

The problem is that with blender, there are several possibilities for
the outcome of that function depending on how the file was ran.  If
you run blender, and load a file into it, the current working
directory is that of the blender exe.  If you run a file, and choose
open with blender, the working directory is that of the file.

Not sure of a better workaround.



More information about the Bf-python mailing list