1 ############################################################################
2 # Copyright (C) 2005 by Reithinger GmbH
5 # This file is part of faces.
7 # faces is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # faces is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the
19 # Free Software Foundation, Inc.,
20 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 ############################################################################
28 _call_dir
= os
.path
.abspath(os
.path
.dirname(sys
.argv
[0]))
30 def get_installation_path():
35 raise AttributeError()
36 except AttributeError:
37 path
= os
.path
.abspath(observer
.__file
__)
38 path
= os
.path
.split(path
)[0]
40 path
= os
.path
.normcase(path
)
44 def get_resource_path():
48 path
= os
.path
.join(path
, "resources", "faces", "gui")
50 raise AttributeError()
51 except AttributeError:
52 path
= get_installation_path()
53 path
= os
.path
.join(path
, "gui", "resources")
55 path
= os
.path
.normcase(path
)
59 def get_template_path():
63 path
= os
.path
.join(path
, "resources", "faces", "templates")
65 raise AttributeError()
66 except AttributeError:
67 path
= get_installation_path()
68 path
= os
.path
.join(path
, "templates")
70 path
= os
.path
.normcase(path
)
74 def get_howtos_path():
79 raise AttributeError()
80 except AttributeError:
81 path
= get_installation_path()
83 path
= os
.path
.join(path
, "howtos")
84 path
= os
.path
.normcase(path
)
90 if isinstance(items
, tuple):
93 if not isinstance(items
, list):
98 for item
in stack
[-1]:
99 if isinstance(item
, tuple):
102 if isinstance(item
, list):
103 stack
.append(iter(item
))
114 def progress_start(title
, maximum
, message
=""):
117 def progress_update(value
, message
=""):