import os
dotNukeDir = os.path.normpath(os.path.expanduser('~/.nuke'))

The normpath call is nice on Windows for standardizing the directory separators 
in the resulting path.

-Nathan



From: Senon 
Sent: Wednesday, January 30, 2013 2:10 AM
To: nuke-python@support.thefoundry.co.uk 
Subject: [Nuke-python] nuke home directory path

hey there,
i got a problem with the nuke home path. i build some tools which access data 
inside the '/.nuke' folder. unfortunately i cant figure out if there is the 
variable which holds this path. independent from the os. (right now its just a 
hard coded path)
so i am aiming for the path until this folder. something like 
nuke.pluginpath['home'] which returns i.e. a string like C:\Users\user\.nuke on 
windows.
i guess its quite easy, but i am just not familiar with os environment 
variables.

thanks,
falk


--------------------------------------------------------------------------------
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to