Hi Andreas,

Actually, if you really have a custom interpreter and this is added in its startup, it's strange that it doesn't work already (PyDev always spawns a shell for the completion and upon startup it'll load the __builtin__ -- or builtins -- module and do a dir() in it).

So, if it's custom interpreter, it's mostly a matter of filling the __builtins__ at the startup... If that's not the case, you could change PyDev to add some custom code at the module scope at /org.python.pydev/pysrc/pycompletionserver.py (but you'll have to maintain your own fork if you choose this path).

Cheers,

Fabio




On Fri, Jul 19, 2013 at 12:15 PM, Andreas Pakulat <andreas@froglogic.com> wrote:
Hi,

I'm currently working on improving our usage of PyDev, in particular
starting to let PyDev not only syntax highlight but also analyze the
code our users write. Unfortunately this has one drawback, we use a
custom interpreter and add several global functions to it (this is done
by having a module for these functions and then importing everything
from this module by default into the global namespace).

I know about the setting for the PyDev analyzer to not show errors on
certain undefined functions/variables, but the number of functions makes
this single lineedit/preference pretty cumbersome to extend.

I'm wondering wether there's a different way (via code maybe?) to teach
PyDev about a list of functions it should consider to be 'predefined',
similar to the builtin modules?

I'm currently using PyDev 2.6, but could upgrade to 2.7.5 if that makes
it easier to achieve what I want.

Andreas

--
Andreas Pakulat squish@froglogic.com
froglogic GmbH - Automated UI and Web Testing

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
pydev-code mailing list
pydev-code@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-code