default folders hardcoded
Bug #226269 reported by
umaxx
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Griffith |
Confirmed
|
Low
|
Unassigned |
Bug Description
hardcoding fonts folder in file "griffith" is a bad idea:
self.widgets[
which results in error messages on startup on BSD-Systems
better do something like this:
self.widgets[
sys.prefix -> /usr or /usr/local depending on the distribution/
os.path for joining path is platform independent way (works on old mac ostoo for example with : as path-seperateor instead of slash or backslash)
Furthermore font path heavily depends on unix-flavor, for example: openbsd uses: /usr/local/
Full acknowledge with os.path, of course. With the bad idea of hardcoding paths too.
But the documentation of python says that sys.prefix is not necessarily the "system path". An extract from the documentation: sion' while the platform independent header files (all except pyconfig.h) are stored in prefix + '/include/ pythonversion' , where version is equal to version[:3].
sys.prefix
A string giving the site-specific directory prefix where the platform independent Python files are installed; by default, this is the string '/usr/local'. This can be set at build time with the --prefix argument to the configure script. The main collection of Python library modules is installed in the directory prefix + '/lib/pythonver
Some linux distributions install software like python at "/opt/..." and fonts at "/usr/...".
I think there should be a better solution as hardcoding paths and the use of sys.prefix.
Suggestions are welcome.