| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/python2.6/site-packages/xdg/ |
Upload File : |
Ñò
²ÊGc @ sE d Z d d k l Z d d k Z e i i d d Z e i i d e i i e d d Z e g e i i d d
i
d Z e i i d e i i e d
Z e g e i i d d i
d Z
e i i d e i i e d Z e d e Z e d e
Z
d Z d Z d Z d Z d Z d S( s
This module is based on a rox module (LGPL):
http://cvs.sourceforge.net/viewcvs.py/rox/ROX-Lib2/python/rox/basedir.py?rev=1.9&view=log
The freedesktop.org Base Directory specification provides a way for
applications to locate shared data and configuration:
http://standards.freedesktop.org/basedir-spec/
(based on version 0.6)
This module can be used to load and save from and to these directories.
Typical usage:
from rox import basedir
for dir in basedir.load_config_paths('mydomain.org', 'MyProg', 'Options'):
print "Load settings from", dir
dir = basedir.save_config_path('mydomain.org', 'MyProg')
print >>file(os.path.join(dir, 'Options'), 'w'), "foo=2"
Note: see the rox.Options module for a higher-level API for managing options.
iÿÿÿÿ( t
generatorsNt HOMEt /t
XDG_DATA_HOMEs .localt sharet
XDG_DATA_DIRSs /usr/local/share:/usr/sharet :t XDG_CONFIG_HOMEs .configt XDG_CONFIG_DIRSs /etc/xdgt XDG_CACHE_HOMEs .cachec C s | S( ( ( t x( ( s5 /usr/lib/python2.6/site-packages/xdg/BaseDirectory.pyt <lambda>/ s c C s | S( ( ( R
( ( s5 /usr/lib/python2.6/site-packages/xdg/BaseDirectory.pyR 0 s c G sR t i i | } t i i t | } t i i | p t i | d n | S( sã Ensure $XDG_CONFIG_HOME/<resource>/ exists, and return its path.
'resource' should normally be the name of your application. Use this
when SAVING configuration settings. Use the xdg_config_dirs variable
for loading.iÀ ( t ost patht joint xdg_config_homet isdirt makedirs( t resourceR
( ( s5 /usr/lib/python2.6/site-packages/xdg/BaseDirectory.pyt save_config_path2 s
c G sO t i i | } t i i t | } t i i | p t i | n | S( sã Ensure $XDG_DATA_HOME/<resource>/ exists, and return its path.
'resource' is the name of some shared resource. Use this when updating
a shared (between programs) database. Use the xdg_data_dirs variable
for loading.( R R
R t
xdg_data_homeR R ( R R
( ( s5 /usr/lib/python2.6/site-packages/xdg/BaseDirectory.pyt save_data_path>