Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
another docs problem - imp
- From: rurpy at yahoo.com (rurpy at yahoo.com)
- Subject: another docs problem - imp
- Date: 9 Jan 2006 18:21:00 -0800
Another Python docs problem...
I was trying to use imp.find_module().
>>> imp.find_module("mymod", "./subdir")
ImportError: No frozen submodule named ./subdir.mymod
subdir/mymod.py definately exists, has reasonable
permissions, etc.
After a lot of reading and re-reading the docs,
trying various things, I Googled on the error
message and lo, there was a message from
2002 by someone ranting about how hard
it was to do things in Python sometimes (no it
was not from me).
Turns out that you have to do
>>> imp.find_module("mymod", ["./subdir"])
I saw not a hint of this in the docs. In fact
they seem to say that the first (unworking)
form *should* work. Bye bye about two
hours altogether...
I thought I would post this and hopefully help
someone else in the future (since I noticed
an unanswered posting here from Mar 2005
about the same problem.)
- Follow-Ups:
- another docs problem - imp
- From: Tony Meyer
- another docs problem - imp
- From: Fredrik Lundh
- another docs problem - imp
- From: Christoph Zwerschke
- another docs problem - imp
- Prev by Date: itertools.izip brokeness
- Next by Date: another docs problem - imp
- Previous by thread: Unicode Question
- Next by thread: another docs problem - imp
- Index(es):