Re: [Pydev-code] Autocompletion in PyDev. A first working version
Brought to you by:
fabioz
From: Parhaum T. <pto...@ho...> - 2004-06-18 16:44:42
|
To be honest, I'm still just trying to figure out how things are working as they are. I'm suffering from not having experience with Python, interpreters, or Eclipse, so it's slow going. - Parhaum ----- Original Message ----- From: "Dana Moore" <dan...@ya...> To: <pyd...@li...> Sent: Friday, June 18, 2004 10:24 AM Subject: RE: [Pydev-code] Autocompletion in PyDev. A first working version > Fabio, Good comments. > > I guess this means that we should work toward a user selectable > autocompletion. We can build upon what we have now of course as an > initial cut, and we can experiment with spawning a CPython interpreter > to run the same code introspection package. Is that how everyone else > reads it? > > Parthoum, if you would prefer look into how we might spawn a CPython > interpreter and run the same introspection code we are using now (which > is in the jythonlib.jar), I could actually move into trying the new > project wizard. Can you let the group know if you'd like to attempt > that effort as soon as you can, so that we can adjust our planning > accordingly. > > Parthoum, I am looking at your thesis features list, and I would like > to help you get as much of tht done as possible; I notice that > autocomplet is on it as well, so maybe it's a good plan for you to get > involved in that way. By the way, we still need to code autocompletion > for an opening round brace "(", I can look at that, in the > PyCompletionProcessor code. The introspector I based this on _should_ > handle that case; I will find out why it's not :-) > > Regards, > > --- Fabio Zadrozny <fa...@in...> wrote: > > Hi Dana, > > > > Well, I don't have PyAlaMode or PyAlaCarte installed (but I use PyDev > > full > > time at work)... > > > > Anyway, I don't think I have to use them in order to demonstrate that > > python > > gets c++ modules definitions... > > > > I have a c++ module called _coilib (It is actually a dll that has an > > interface with boost python). > > > > When I import it and call dir(_coilib), it returns to me all the > > functions > > the dll has without any problems (we would have to spawn a process > > and call > > dir on the module to get the completion suggestions). > > > > And, well, thinking in the other way, if I'm developing with Jython > > and not > > in CPython, I would like to import java.awt and see the code > > completion for > > that, so, I think, that having an option to develop in Jython or in > > CPython > > would be the ideal thing... > > > > []s > > > > Fabio > > > > -----Original Message----- > > From: pyd...@li... > > [mailto:pyd...@li...] On Behalf Of Dana > > Moore > > Sent: quinta-feira, 17 de junho de 2004 13:25 > > To: pyd...@li... > > Subject: Re: [Pydev-code] Autocompletion in PyDev. A first working > > version > > > > --- 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 > > > > > > ------------------------------------------------------- > > 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 > > > > > > > > ------------------------------------------------------- > > 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 > > > === message truncated === > > > ===== > _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ > _/ Dana Moore _/ > _/ BBN Technologies LLC _/ > _/ M: 240.350.4196 _/ > _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - You care about security. So do we. > http://promotions.yahoo.com/new_mail > > > ------------------------------------------------------- > 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 > > |