From: Charlie G. <cha...@gm...> - 2007-08-23 16:15:11
|
inspect has been added to Jython 2.2, so you should be able to import it with that version. Charlie On 8/23/07, Don Coleman <dco...@ch...> wrote: > Your import failed because inspect.py is not included with Jython 2.1. > For jythonconsole I used inspect.py from CPython 2.2.2. > > On 8/22/07, Jake B <ota...@gm...> wrote: > > Just a quick note: > > I tried import inspect under jython 2.2rc3, and it works fine, but it fails > > under jython 2.1. > > Is this normal? > > Please let me know. Thanks. > > > > Jake > > > > > > On 8/22/07, Jake B <ota...@gm...> wrote: > > > Thank you for the quick replies! Jythonconsole is very interesting. Also, > > I found that the commercial version of Pydev supports some autocompletion > > and autoimports libraries. Unfortunately, Pydev autocompletion doesn't work > > perfectly, and jythonconsole does not yet adequately fulfill my needs for an > > editing environment. > > > For now, I'd just be happy to have the inspect module working. The > > developer of jythonconsole says that he uses inspect.py in his > > implementation, but whenever i'm using jython and I try to import it, I > > always get an error message saying that the module cannot be found. When I'm > > in python, however, I'm able to import it just fine. > > > If anyone has any advice as to how I could troubleshoot this, I would > > greatly appreciate it if you would let me know. Thanks. > > > > > > Jake > > > > > > > > > > > > On 8/21/07, Pekka Laukkanen <pe...@ik...> wrote: > > > > 2007/8/21, Jake B < ota...@gm...>: > > > > > I was wondering if there > > > > > were any other function that could retrieve an object's public methods > > and > > > > > other constructs. > > > > > > > > You probably already know about it but simply using dir(object) gives > > > > you list of all the object's attributes. If you are only interested > > > > about methods, relatively simple code like below can help. > > > > > > > > >>> from java.lang import String > > > > >>> from types import MethodType > > > > >>> s = String('') > > > > >>> for a in [a for a in dir(s) if type(getattr(s, a)) is MethodType ]: > > > > ... print a > > > > > > > > > > > > Cheers, > > > > .peke > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Jython-users mailing list > > Jyt...@li... > > https://lists.sourceforge.net/lists/listinfo/jython-users > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |