Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #8813 > unrolled thread

imp.find_module don't found my module but standard import statement can import this module… why ?

Started byStéphane Klein <stephane@harobed.org>
First post2011-07-05 09:36 +0200
Last post2011-07-05 09:36 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  imp.find_module don't found my module but standard import statement can import this module… why ? Stéphane Klein <stephane@harobed.org> - 2011-07-05 09:36 +0200

#8813 — imp.find_module don't found my module but standard import statement can import this module… why ?

FromStéphane Klein <stephane@harobed.org>
Date2011-07-05 09:36 +0200
Subjectimp.find_module don't found my module but standard import statement can import this module… why ?
Message-ID<mailman.622.1309851435.1164.python-list@python.org>
Hi,

I would like import some module dynamically.

First, I install "js.jquery"

$ pip install js.jquery

Here, I would like import "js" module.

 >>> import imp
 >>> imp.find_module("js")
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
ImportError: No module named js
 >>> import js
 >>>

I can't found module with "imp.find_module" but I can import it with 
standard "import" statement.

Where is my mistake ?

Regards,
Stephane
-- 
Stéphane Klein <stephane@harobed.org>
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web