Re: [Pydev-code] Autocompletion in PyDev. A first working version
Brought to you by:
fabioz
From: Aleks T. <a...@to...> - 2004-06-17 05:16:07
|
Hi, I think Fabio's problem is that his python code requires Python version > 2.3. When Jython is used by pydev to parse this file, it fails, and autocompletion does not work. Conversely, if his code required Jython to run, autocompletion based upon CPython interpreter would fail to work. So no one solution would please both Jython & CPython developers. What's the right solution? If scripts can run in both Python & Jython environment, then the user could have an option to pick one they are using. This route involves additional work: You'd have to communicate with Python interpreter through stdio or sockets. Debugger does this, and almost works with Jython. Not quite, since its threading model is different. Or different features can use different interpreters, and they just won't work for the other guy. This might sort itself out as Jython catches up with CPython. If this is what we do, make sure that you are clearly communicating to users what is happening. So far: - debugger will work with CPython - auto-completion will work with Jython the users might get confused. This is where doing an IDE in a foreign language (Java) gets to be tricky. Good luck, Aleks > Is Jython's failure to be fully version compliant a problem? If we're > just running a module to introspect code (which was actually a direct > port from CPython) then does Jython's version skew actually present a > problem? If it does, then perhaps one that can be worked separately; > perhaps Kevin Altis might have a comment or two on this topic. > > >>So, basically, what I want to say is that it is good the way it is > > for Jython development, but when it comes to develop in python, I think > that jython just hasn't arrived there yet... (still version 2.1) and > for some things like dependency on c++ modules, it probably never will > (and this has never been its purpose). > > Correct statements, both. Is there are better way to invoke Python > introspection directly from Eclipse? I suppose we might spawn a > separate command line thread "python introspector.py" and pipe the > result to standard out or a temp file and then read that stream? > > >>Of course, we could let the user choose what to use, if we want to > > extend the plug-in to develop in jython, but I think that it must > support python without dependency on jython. > > What's everyone else think? I suppose we could spawn Python as I have > suggested; we can certainly assume that the use _will_ have Python on > their system. therefore it's not entirely lame-brain to think about > spawning Python to do this job, but I would rather fix the defects in > the current implementation rather than experiment with a new solution, > especially if PyAlaMode and other similar completion capabilities yield > no different result. > |