Hi,
following up on this thread on StackOverflow
http://stackoverflow.com/questions/16515347/python-import-hooks-and-main
does somebody has a great idea how to manage this?
The issue at hand is, that I would like to apply a specific import hook
right from the beginning of the interpreter
On 23/11/2013 12:23, Ed Schofield wrote:
Hi all,
I am the author of the ``future`` package for Python 2/3 compatibility
(http://python-future.org). A bug report has recently been posted about its use
of import hooks that I don't yet have an answer for, and I am looking for some
guidan
Hi all,
I am the author of the ``future`` package for Python 2/3 compatibility
(http://python-future.org). A bug report has recently been posted about its use
of import hooks that I don't yet have an answer for, and I am looking for some
guidance on how to customize the import mechanism
Hello,
I'm currently working on implementing Import Hooks (PEP302) with Python
2.7 to be able to import modules whose code is in ZODB. However, I have
stumbled upon a widely known issue about import deadlock[0][1] (note
that this issue is not directly related to ZODB, but a more general
que
Hello,
I'm currently working on implementing Import Hooks (PEP302) with Python
2.7 to be able to import modules whose code is in ZODB. However, I have
stumbled upon a widely known issue about import deadlock[0][1] (note
that this issue is not directly related to ZODB, but a more general
que
On Sun, 2011-08-07 at 11:11 -0700, Josh Haberman wrote:
> When reading about import hooks, I came across a blog entry comment
> that says:
>
> One additional thing to note about ihooks is that it's
> somewhat seriously broken on Python 2.5 and newer and there
> s
Josh Haberman wrote:
> When reading about import hooks, I came across a blog entry comment
> that says:
>
> One additional thing to note about ihooks is that it's
> somewhat seriously broken on Python 2.5 and newer and there
> seems to be little or no inte
When reading about import hooks, I came across a blog entry comment
that says:
One additional thing to note about ihooks is that it's
somewhat seriously broken on Python 2.5 and newer and there
seems to be little or no interest in fixing it. It's
probably worth *always* avo
On Feb 18, 1:28 am, Sreejith K wrote:
> On Feb 18, 1:57 pm, Steven D'Aprano
>
>
>
> wrote:
> > On Thu, 18 Feb 2010 00:03:51 -0800, Jonathan Gardner wrote:
> > > On Feb 17, 10:48 pm, Sreejith K wrote:
> > >> Hi everyone,
>
> > >&
ryone,
I need to implement custom import hooks for an application
(http://www.python.org/dev/peps/pep-0302/). I want to restrict an
application to import certain modules (say socket module). Google app
engine is using a module hook to do this (HardenedModulesHook in
google/ appengine/
>>>> Hi everyone,
>
> >>>> I need to implement custom import hooks for an application
> >>>> (http://www.python.org/dev/peps/pep-0302/). I want to restrict an
> >>>> application to import certain modules (say socket module). Google app
> &
Sreejith K wrote:
On Feb 18, 1:57 pm, Steven D'Aprano
wrote:
On Thu, 18 Feb 2010 00:03:51 -0800, Jonathan Gardner wrote:
On Feb 17, 10:48 pm, Sreejith K wrote:
Hi everyone,
I need to implement custom import hooks for an application
(http://www.python.org/dev
On Feb 18, 1:57 pm, Steven D'Aprano
wrote:
> On Thu, 18 Feb 2010 00:03:51 -0800, Jonathan Gardner wrote:
> > On Feb 17, 10:48 pm, Sreejith K wrote:
> >> Hi everyone,
>
> >> I need to implement custom import hooks for an application
> >> (http://w
On Thu, 18 Feb 2010 00:03:51 -0800, Jonathan Gardner wrote:
> On Feb 17, 10:48 pm, Sreejith K wrote:
>> Hi everyone,
>>
>> I need to implement custom import hooks for an application
>> (http://www.python.org/dev/peps/pep-0302/). I want to restrict an
>> applicati
On Feb 17, 10:48 pm, Sreejith K wrote:
> Hi everyone,
>
> I need to implement custom import hooks for an application
> (http://www.python.org/dev/peps/pep-0302/). I want to restrict an application
> to import certain modules (say socket module). Google app engine is
> using a
Hi everyone,
I need to implement custom import hooks for an application (http://
www.python.org/dev/peps/pep-0302/). I want to restrict an application
to import certain modules (say socket module). Google app engine is
using a module hook to do this (HardenedModulesHook in google/
appengine/tools
The simple program
#--
def main():
print repr(u'\u2029'.encode('utf-8'))
if __name__ == "__main__":
main()
#--
works as expected when run from the command-line, but fails when
converted to an executable using PyI
--- Patrick Stinson <[EMAIL PROTECTED]>
escribió:
> Right on, that seemed to work, thanks.
> This is different than sys.path_hooks though, which
> requires a callable or
> string subclass?
Yes, it's different, meta_path is a generic mechanism
that doesn't depend on sys.path and is tried before
sy
Right on, that seemed to work, thanks.
This is different than sys.path_hooks though, which requires a callable or
string subclass?
After some experimentation it looks like you can disallow an import by
raising an import error from your meta_path hook. It seems a little weird
that python will then
En Wed, 16 Apr 2008 09:04:36 -0300, Patrick Stinson
<[EMAIL PROTECTED]> escribió:
> I am defining a simple finder/loader object and adding it to
> sys.meta_path
> like this:
>
> PyRun_SimpleString("import sys; import ousiainternal; sys.meta_path =
> [ousiainternal.OusiaImporter]");
You should
I am defining a simple finder/loader object and adding it to sys.meta_path
like this:
PyRun_SimpleString("import sys; import ousiainternal; sys.meta_path =
[ousiainternal.OusiaImporter]");
The following C code defines the loader object:
static void
MyImporter_dealloc(PyObject *self)
{
self-
En Tue, 15 Apr 2008 22:14:18 -0300, Patrick Stinson
<[EMAIL PROTECTED]> escribió:
> What's the current way to install an import hook? I've got an embedded
> app
> that has a few scripts that I want to import each other, but that are
> not in
> sys.modules. I intentionally keep them out of sy
What's the current way to install an import hook? I've got an embedded app
that has a few scripts that I want to import each other, but that are not in
sys.modules. I intentionally keep them out of sys.modules because their
names will not be unique across the app. They will, however, be unique
betw
23 matches
Mail list logo