Re: [Pydev-code] Autocompletion in PyDev. A first working version
Brought to you by:
fabioz
From: Dana M. <dan...@ya...> - 2004-06-17 16:25:24
|
--- Aleks Totic <a...@to...> wrote: > 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. > Aleks, that what I thought might be the problem at first; then I considered that Jython is merely running a bit of CPython code (actually developed on 2.3.x) So I then wondered whether his argument was valid or not. I mean: I understand that the jython interpreter itself is not 2.3 compliant but why should that matter if the intrspection code _is_ -- That is is there anything from the jython runtime system that prevents us from doing as good a job as (say) PyAlaMode. I noted the one thing which is Fabio's suggested little kludge to exec "class object:pass", but is there anything else??? That's why I am asking Fabio to try out his part python/part C++ code in somethign like PyAlaMode or PyAlaCarte and let us know. > 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. > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference > Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer > Conference, June 28 - July 1 at the Moscone Center in San Francisco, > CA > REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code > NWMGYKND > _______________________________________________ > Pydev-code mailing list > Pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code > ===== _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ Dana Moore _/ _/ BBN Technologies LLC _/ _/ M: 240.350.4196 _/ _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail |