You can get the user folder with os.path.expanduser :
in win
>>> import os, os.path >>> os.path.expanduser('~') 'C:\\Documents and Settings\\alko'
on * nix
>>> os.path.expanduser('~') '/home/alko'
And create a point folder with os.mkdir (works on both):
>>> hd = os.path.expanduser('~') >>> os.mkdir(os.path.join(hd, '.my-config'))
source share