Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > imp.find_module don't found my module but standard import statement can import this module… why ?

Reply
Thread Tools

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

 
 
Stéphane Klein
Guest
Posts: n/a
 
      07-05-2011
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 <(E-Mail Removed)>
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why 'import module' will not import module.py but the directorymodule? Peng Yu Python 0 10-31-2009 11:51 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
Why can't I "from module import *" except at module level? Mudcat Python 3 01-14-2006 01:49 AM
Handling import conflicts when module has the same name as a library module that it needs to import? plb Python 0 02-08-2005 01:08 PM
Handling import conflicts when module has the same name as a library module that it needs to import? plb Python 0 02-08-2005 01:01 PM



Advertisments