Another Python docs problem...
I was trying to use imp.find_module ().
[color=blue][color=green][color=darkred]
>>> imp.find_module ("mymod", "./subdir")[/color][/color][/color]
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[color=blue][color=green][color=darkred]
>>> imp.find_module ("mymod", ["./subdir"])[/color][/color][/color]
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.)
I was trying to use imp.find_module ().
[color=blue][color=green][color=darkred]
>>> imp.find_module ("mymod", "./subdir")[/color][/color][/color]
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[color=blue][color=green][color=darkred]
>>> imp.find_module ("mymod", ["./subdir"])[/color][/color][/color]
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.)
Comment