durusmail: quixote-users: Re: enable_ptl/easy_install problem
enable_ptl/easy_install problem
2007-04-30
2007-04-30
2007-04-30
2007-04-30
2007-05-01
2007-05-01
2007-05-01
2007-05-01
Re: enable_ptl/easy_install problem
2007-05-01
2007-05-01
2007-05-01
2007-05-01
Re: enable_ptl/easy_install problem - WORKING!
2007-05-02
Re: enable_ptl/easy_install problem
Mike Orr
2007-05-01
On 5/1/07, Michael Watkins  wrote:
> * Michael Watkins wrote on [2007-05-01 13:14:38 -0700]:
>
> > * Mike Orr wrote on [2007-05-01 12:48:03 -0700]:
> > >  You can make a utility script like this:
> > -- snip --
> > >  Import hooks are fragile in Python, and often break when combined with
> > >  import hooks from other packages.
> >
> > Can't speak for the developers of QP but no doubt this was one of
> > the reasons behind dropping the import hook in Quixote's cousin QP
> > in favour of putting two lines in one or more of a package's
> > __init__.py:
> >
> >     from qpy.compile import compile_qpy_files
> >     compile_qpy_files(__path__[0])
>
> forgot to add... taking Mike's proposed script and using the
> __init__.py approach of QP could likely be cooked up into a workable
> solution for Quixote PTL files too.

You could also run it in a separate process at the beginning of your
production application (see Python's subprocess module).  That would
prevent any import hooks from leaking into the main application
process.

--
Mike Orr 
reply