[Panel-devel] getThemePath broken in SK
Matt
matt-lists at comnet.net.nz
Sun Jun 5 23:09:28 CEST 2005
On Mon, 06 Jun 2005 08:36, Petri Damsten wrote:
> On Sunday 05 June 2005 22:35, Matt wrote:
> > Could you also explain the new readThemeFile function, so I can
> > understand if it will help me.
>
> This code should produce two similar outputs if it's run from non skz
> themes. Latter should also work from skz theme.
>
> # Reading file (doesn't work with skz themes)
> f = open(karamba.getThemePath(widget) + '/maindata.xml')
> s = f.read()
> f.close()
> print s
>
> # This works also in skz themes
> s = karamba.readThemeFile(widget, 'maindata.xml')
> print s
>
> Petri
I'm not sure that that will help either of my issues. The codecs.open()
function is what I use to be able to use utf-8 encoded translation files. In
the second example, is the new object 's' an unadulterated version of
maindata.xml? If so, I may still be able to manipulate it, to decode it.
I'll need to update from svn and test it later today.
In terms of changing to a new 'root' directory in the theme, if you're using
an skz file, are all files relative to the .skz file?
--
Regards
Matt
More information about the Panel-devel
mailing list