On Tue, Jul 19, 2005 at 05:20:48AM -0300, Jose de Paula Eufrasio Junior wrote:
> Hello there.
> 
> Two simple questions:
> 
> 1) There's a way to set the theme that an app will use, without
> setting it globally or for the user? Like, just that app will use a
> different theme...
> 
> 2) Using Python or py2exe to generate a standalone executable requires
> the installation of the gtk runtime for win32, there's a way to pack
> the runtime in some way that doesn't require installing the whole
> package? Like, a private gtk installation on the apps dir.
I make the GTK installation be a subdirectory of my app dir.  Then I set my
environment variable and path BEFORE I load the gtk module.

So you main app might have something like this at the top:

import sys, os
prog_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
if 'frozen' in dir(sys) and sys.platform == 'win32':
    os.environ['PATH'] = os.path.join(prog_dir, "gtk", "lib;") + \
                                            os.environ['PATH']
    os.environ['PATH'] = os.path.join(prog_dir, "gtk", "bin;") + \
                                            os.environ['PATH']
    os.environ['GTK_BASEPATH'] = os.path.join(prog_dir,"gtk")

import pygtk
import gtk




> 
> []s
> 
> -- 
> Jose de Paula Eufrasio Junior <[EMAIL PROTECTED]>
> aka coredump
> http://coredump.osimortais.com.br
> _______________________________________________
> pygtk mailing list   [email protected]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to