Discussion:
[Jython-users] ImportError: no module named inspect
blaaaa
2011-11-14 15:54:45 UTC
Permalink
I have the following line in a java file that doesn't seem to work.

interp.exec("import inspect");

I get ImportError: no module named inspect.

It seems like the inspect module has been made compatible with Jython so
what should I do to get it to work?

Thanks in advance!
--
View this message in context: http://old.nabble.com/ImportError%3A-no-module-named-inspect-tp32818619p32818619.html
Sent from the jython-users mailing list archive at Nabble.com.
Alan Kennedy
2011-11-14 20:06:14 UTC
Permalink
[blaaaa]
I have the following line  in a java file that doesn't seem to work.
interp.exec("import inspect");
I get  ImportError: no module named inspect.
Do you have the jython.jar in your classpath?

Have you specified a value for python.home system property on
interpreter startup?

http://wiki.python.org/jython/JythonFaq/EmbeddingJython#My_modules_can_not_be_found_when_imported_from_an_embedded_application

Alan.
Pierre Thibault
2011-11-15 01:54:18 UTC
Permalink
blaaaa
2011-11-15 10:38:28 UTC
Permalink
unknown
1970-01-01 00:00:00 UTC
Permalink
--f46d04155478f5cf4b04b1bc4306
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Post by blaaaa
I have the following line in a java file that doesn't seem to work.
interp.exec("import inspect");
I get ImportError: no module named inspect.
It seems like the inspect module has been made compatible with Jython so
what should I do to get it to work?
Thanks in advance!
It works well on my Jython console. OpenSuse 11.4, AMD64, Jython 2.5.2.

Pierre Thibault

Python Developer/Développeur Python
Montréal, QC
****@gmail.com*

--f46d04155478f5cf4b04b1bc4306
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable <div class="gmail_quote">2011/11/14 blaaaa <span dir="ltr">&lt;<a href="mailto:***@gmail.com">***@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<br>
I have the following line  in a java file that doesn&#39;t seem to work.<br>
<br>
interp.exec(&quot;import inspect&quot;);<br>
<br>
I get  ImportError: no module named inspect.<br>
<br>
It seems like the inspect module has been made compatible with Jython so<br>
what should I do to get it to work?<br>
<br>
Thanks in advance!<br></blockquote><div><br>It works well on my Jython console. OpenSuse 11.4, AMD64, Jython 2.5.2. <br></div></div><br style="color:rgb(0, 0, 153)"><font color="#888888"><font style="color:rgb(51, 102, 255)" size="2"><span style="color:rgb(0, 0, 153)">Pierre Thibault<br>
</span></font><div style="color:rgb(51, 102, 255)"><font><font color="#888888"><font color="#888888"><font style="color:rgb(51, 102, 255)" size="2"><span style="color:rgb(0, 0, 153)"><img src="Loading Image..."><br>
</span></font></font></font></font>Python Developer/Développeur Python<br>Montréal, QC<br></div><div><i style="color:rgb(51, 102, 255)"><a href="mailto:***@gmail.com" target="_blank">***@gmail.com</a></i><br style="color:rgb(51, 102, 255)">
<span style="color:rgb(51, 102, 255)"></span><br></div><div></div><div><font><font color="#888888"><font color="#888888"><font style="color:rgb(51, 102, 255)" size="2"><span style="color:rgb(0, 0, 153)"><br></span></font></font></font></font><img src="Loading Image..."><font color="#888888"><font style="color:rgb(51, 102, 255)" size="2"><span style="color:rgb(0, 0, 153)"></span></font></font></div>
<div><br></div></font><br><br>

--f46d04155478f5cf4b04b1bc4306--
unknown
1970-01-01 00:00:00 UTC
Permalink
I'm writing an eclipse plugin and I'm testing it in a second session of
eclipse.
I have the jython.jar in my classpath, and I have added the python.path
property .. It still doesn't work...=20
Post by unknown
=20
=20
Post by blaaaa
I have the following line in a java file that doesn't seem to work.
interp.exec("import inspect");
I get ImportError: no module named inspect.
It seems like the inspect module has been made compatible with Jython so
what should I do to get it to work?
Thanks in advance!
=20
It works well on my Jython console. OpenSuse 11.4, AMD64, Jython 2.5.2.
=20
Pierre Thibault
=20
Python Developer/D=C3=A9veloppeur Python
Montr=C3=A9al, QC
=20
-------------------------------------------------------------------------=
-----
Post by unknown
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Jython-users mailing list
https://lists.sourceforge.net/lists/listinfo/jython-users
=20
=20
--=20
View this message in context: http://old.nabble.com/ImportError%3A-no-modul=
e-named-inspect-tp32818619p32846741.html
Sent from the jython-users mailing list archive at Nabble.com.
unknown
1970-01-01 00:00:00 UTC
Permalink
I'm writing an eclipse plugin and I'm testing it in a second session of
eclipse.
I have the jython.jar in my classpath, and I have added the python.path
property .. It still doesn't work...=20

I'm running Eclipse 3.71 and Jython 2.5.2 on linux.=20
Post by unknown
=20
=20
Post by blaaaa
I have the following line in a java file that doesn't seem to work.
interp.exec("import inspect");
I get ImportError: no module named inspect.
It seems like the inspect module has been made compatible with Jython so
what should I do to get it to work?
Thanks in advance!
=20
It works well on my Jython console. OpenSuse 11.4, AMD64, Jython 2.5.2.
=20
Pierre Thibault
=20
Python Developer/D=C3=A9veloppeur Python
Montr=C3=A9al, QC
=20
-------------------------------------------------------------------------=
-----
Post by unknown
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Jython-users mailing list
https://lists.sourceforge.net/lists/listinfo/jython-users
=20
=20
--=20
View this message in context: http://old.nabble.com/ImportError%3A-no-modul=
e-named-inspect-tp32818619p32846741.html
Sent from the jython-users mailing list archive at Nabble.com.

Loading...