[wingide-users] Getting the User Settings Directory programatically

Martin Fiers martin.fiers at intec.ugent.be
Fri Feb 22 11:57:39 EST 2013


Hello,

I would like to install some code snippets for our users automatically.  
I gave a tutorial today, and asked them to manually copy them. It would 
be better if I could set it up for them automatically.

To do this, I need to solve two problems:

1) In some cases, the user settings directory did not exist? After 
clicking the snippets button in the IDE, it created the snippets 
directory. That is very strange? Does that mean that when I copy my 
snippets initially to the {USD}/snippets/py folder, they would be 
overwritten when someone opens Wing for the first time?

2) Is there a way to programatically get the user settings directory 
from within Python? http://wingware.com/doc/install/user-settings-dir
Apparently, even on Windows 7, it sometimes uses AppData, sometimes it 
uses Application Data... We are all running Windows 7 here.
In other words, what is the Wing get_user_settings_dir function. If I 
could use that one, I'm all set ;)

With kind regards,
Martin Fiers



More information about the wingide-users mailing list