Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4581529
By: csabakoncz
Hi Fabio,
Thank you a lot! I added "System" to the list of forced built-ins, and after
a few hours of fighting I managed to get import tips and code completion work
for this module.
IronPython has introspection capabilities similar to CPython and possibly better
than Jython.
E.g. .Net XML documentation are accessible via the __doc__ attribute or
inspect.getdoc().
However, I had to modify one of the PyDev Python sourcefiles: in
importsTipper.py
my version of GetFile looks like this:
def GetFile(mod):
f = None
try:
f = inspect.getsourcefile(mod) or inspect.getfile(mod)
except:
if hasattr(mod,'__file__'):
f = mod.__file__
try:
if f.lower(f[-4:]) in ['.pyc', '.pyo']:
filename = f[:-4] + '.py'
if os.path.exists(filename):
f = filename
except:
f = None
pass #on IronPython mod.__file__ is a list, not a string
return f
(The code above works because instead of returning null, inspect.getsourcefile()
throws an exception on IP)
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=293649
-------------------------------------------------------------------------
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/
_______________________________________________
Pydev-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pydev-users