~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to src/common/util.py

  • Committer: mattgiuca
  • Date: 2007-12-17 05:27:38 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:75
apps/help: Now displays a top-level menu of all apps with help documents.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
# Date: 12/12/2007
21
21
 
22
22
# Contains common utility functions.
23
 
# Also initialises mime types library. You must import util before using
24
 
# Python's builtin mimetypes module to make sure local settings are applied.
25
23
 
26
24
import os
27
 
import mimetypes
28
25
 
29
26
import conf
30
 
import conf.mimetypes
31
27
 
32
28
root_dir = conf.root_dir
33
29
 
91
87
        return (splitpath[0], '')
92
88
    else:
93
89
        return tuple(splitpath)
94
 
 
95
 
# Initialise mime types library
96
 
mimetypes.init()
97
 
for (ext, mimetype) in conf.mimetypes.additional_mime_types.items():
98
 
    mimetypes.add_type(mimetype, ext)
99