|
From: Steve C. <ste...@ya...> - 2004-11-10 08:19:25
|
On Wed, 2004-11-10 at 12:16,
mat...@li... wrote:
> John Hunter wrote:
> > Perhaps it would be better to define a constant in
> > matplotlib.__init__.py, something like
> >
> > matplotlib.PY2EXE = hasattr(sys, 'frozen')
> >
> > because then the code which is conditional upon py2exe would be more
> > readable
> >
> > if not matplotlib.PY2EXE
> > pygtk.require('2.0')
> >
> > or something like that...
>
> Except that Py2EXE is not the only method of "freezing" apps. In
> particular, you'd want this to work with OS-X's Py2App, and probably
> other methods of bundling apps.
>
> you might want:
>
> matplotlib.FROZEN = hasattr(sys, 'frozen')
>
> and
>
> if not matplotlib.FROZEN
> pygtk.require('2.0')
>
> Then you could also accommodate other keywords that other bundling
> methods use.
>
> BTW, is someone really successfully using PyGTK on Windows? Cool!
>
> -Chris
I added matplotlib.FROZEN to matplotlib.__init__.py.
It did not work because matplotlib has not yet been imported when
pygtk.require() is called. So I changed the import order and it seems to
be working on now.
Steve
|