pydev-code Mailing List for PyDev for Eclipse (Page 24)
Brought to you by:
fabioz
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
(14) |
Apr
(18) |
May
(12) |
Jun
(34) |
Jul
(31) |
Aug
(37) |
Sep
(22) |
Oct
(2) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(1) |
Feb
(4) |
Mar
(9) |
Apr
(1) |
May
|
Jun
(2) |
Jul
(24) |
Aug
(3) |
Sep
(5) |
Oct
(3) |
Nov
(3) |
Dec
(5) |
2006 |
Jan
(5) |
Feb
(23) |
Mar
(5) |
Apr
(80) |
May
(26) |
Jun
(13) |
Jul
(13) |
Aug
(4) |
Sep
(31) |
Oct
(24) |
Nov
(6) |
Dec
(2) |
2007 |
Jan
(7) |
Feb
|
Mar
(26) |
Apr
(3) |
May
(8) |
Jun
(6) |
Jul
(11) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
(3) |
2008 |
Jan
(7) |
Feb
(1) |
Mar
(6) |
Apr
(7) |
May
(9) |
Jun
(14) |
Jul
(9) |
Aug
(6) |
Sep
(10) |
Oct
(5) |
Nov
(8) |
Dec
(5) |
2009 |
Jan
(8) |
Feb
(10) |
Mar
(10) |
Apr
(1) |
May
(3) |
Jun
(5) |
Jul
(10) |
Aug
(3) |
Sep
(12) |
Oct
(6) |
Nov
(22) |
Dec
(12) |
2010 |
Jan
(10) |
Feb
(17) |
Mar
(5) |
Apr
(9) |
May
(8) |
Jun
(2) |
Jul
(4) |
Aug
(12) |
Sep
(1) |
Oct
(1) |
Nov
(8) |
Dec
|
2011 |
Jan
(14) |
Feb
(8) |
Mar
(3) |
Apr
(11) |
May
(6) |
Jun
(5) |
Jul
(10) |
Aug
(7) |
Sep
|
Oct
(4) |
Nov
(4) |
Dec
(8) |
2012 |
Jan
|
Feb
(8) |
Mar
(10) |
Apr
(5) |
May
(4) |
Jun
(10) |
Jul
|
Aug
(2) |
Sep
(2) |
Oct
(11) |
Nov
(1) |
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(11) |
Apr
(10) |
May
(7) |
Jun
(9) |
Jul
(13) |
Aug
(20) |
Sep
(4) |
Oct
(18) |
Nov
(5) |
Dec
(7) |
2014 |
Jan
(3) |
Feb
(5) |
Mar
(7) |
Apr
(5) |
May
(10) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(7) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
2015 |
Jan
(1) |
Feb
(1) |
Mar
(8) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(2) |
Sep
(1) |
Oct
(3) |
Nov
(5) |
Dec
(1) |
2016 |
Jan
(26) |
Feb
(10) |
Mar
(4) |
Apr
|
May
(4) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(4) |
Dec
(3) |
2017 |
Jan
(3) |
Feb
|
Mar
(9) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(9) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
|
2018 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(4) |
Oct
(2) |
Nov
(1) |
Dec
(3) |
2019 |
Jan
(4) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(4) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(11) |
2021 |
Jan
(3) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
From: Fabio Z. <fa...@ap...> - 2009-07-17 00:51:11
|
> My first sign of trouble was right after the update, there was a > weird focus thing, where I couldn't get keystrokes or mousing to go > to the Eclipse app. Even though I selected Eclipse, the keystrokes > would continue to go to the previous application I had used. > > That went away after minimizing the window and bringing it back. > However now, even though I've restarted, and changed workspaces > several times, my PyDev workspaces don't show up in the "Pydev > Package Explorer". I can open my python files and run them still. > Just can't see the projects. > > I've verified I can create a new project and it shows up in the > explorer, but I can't get Eclipse/Pydev to recognize the existing 10 > projects in my workspace. I've tried changing workspaces, disabling > and re-enabling pydev, and even reverting to an old pydev. > > Perhaps it's an Eclipse related thing - anyone know how to force it > to recognize the existing workspace? > > Interestingly, if I select Export a project as an archive, it offers > me the projects in the workspace, so it knows about their existence. Ok, in that case, there are 2 things to check: - you have a working set selected that doesn't include your projects (I've seen one case where eclipse selected 'window working set' and nothing appeared there anymore)? - you have some other active filter or the content is not properly there (that's much more uncommon if you didn't change it) To check, the working set, go to the pydev package explorer, ctrl+F10 (not sure if it's the same for that menu on mac os, but if it's not, there's a triangle icon to activate that menu), then choose 'select working set' and try to select 'no working sets' -- or create a working set containing the projects you want to work on and select that working set. To check the active filters, go to that same menu > customize view and check if the content contains "pydev navigator content" and "resources" and if your filters match what you want. Cheers, Fabio |
From: Ross <ro...@gm...> - 2009-07-17 00:38:54
|
Hello, I tried to update my PyDev plug-in for Eclipse, where I'd been pretty happy. I confess to not being an Eclipse guru - I know how to do what I need to do to be productive, and that's all. Working on Mac OS X 10.4 My first sign of trouble was right after the update, there was a weird focus thing, where I couldn't get keystrokes or mousing to go to the Eclipse app. Even though I selected Eclipse, the keystrokes would continue to go to the previous application I had used. That went away after minimizing the window and bringing it back. However now, even though I've restarted, and changed workspaces several times, my PyDev workspaces don't show up in the "Pydev Package Explorer". I can open my python files and run them still. Just can't see the projects. I've verified I can create a new project and it shows up in the explorer, but I can't get Eclipse/Pydev to recognize the existing 10 projects in my workspace. I've tried changing workspaces, disabling and re-enabling pydev, and even reverting to an old pydev. Perhaps it's an Eclipse related thing - anyone know how to force it to recognize the existing workspace? Interestingly, if I select Export a project as an archive, it offers me the projects in the workspace, so it knows about their existence. Kind Regards, Ross |
From: Fabio Z. <fa...@ap...> - 2009-07-16 15:00:14
|
Hi Thomas, > Therefore we would like to robustify this: when pressing our 'start > debug trace of Studio' > we would like our plugin also to activate pydev server if it has not > already been done, > and generally help or at least inform/warn when things are are about to > go wrong. > Are there any api calls for starting the pydev debug server, or probing > its state? Ok, I've created a public API for that in the "com.python.pydev.debug" plugin. You can get it at the next nightly build (svn: 2851) -- it'll be available in a final release for 1.4.8. The API is: com.python.pydev.debug.remote.client_api.PydevRemoteDebuggerServer.startServer() com.python.pydev.debug.remote.client_api.PydevRemoteDebuggerServer.stopServer() com.python.pydev.debug.remote.client_api.PydevRemoteDebuggerServer.isRunning() (those are static methods) Cheers, Fabio |
From: Fabio Z. <fa...@gm...> - 2009-07-16 02:05:41
|
Hi Thomas, (answers below) > We're writing a plugin which provides some functionality for starting, > running and debugging Python code running in an external application > called 'Studio'. Among other things, our plugin provides a button > 'start debug trace of Studio' which runs pydevd.settrace() in Studio, > to connect back to the (running!) pydev debug server. > > Currently, however, before pressing 'start debug trace of Studio' the > user must > have pressed the button 'pydev:start pydev debug server' exactly once, > otherwise > it will not work, nor will retrying start pydev debug server + start > debug trace. > (Nor does start+stop+start of pydev debug server). Once it has gone > wrong in this way, > there appears to be no way to recover except restarting Eclipse. > > Therefore we would like to robustify this: when pressing our 'start > debug trace of Studio' > we would like our plugin also to activate pydev server if it has not > already been done, > and generally help or at least inform/warn when things are are about to > go wrong. > Are there any api calls for starting the pydev debug server, or probing > its state? > > Any help and hints with this would be greatly appreciated! > We are currently using pydev+extensions 1.4.4 , with eclipse 3.4.1. Right now, there's no standard API for it to work (the com.pyhon.pydev.debug plugin doesn't export any symbols). I'm going to add a way to get its state, start and stop it... Do you think you need something else from it? Cheers, Fabio |
From: Thomas J. <th...@sk...> - 2009-07-14 14:09:41
|
Hi, We're writing a plugin which provides some functionality for starting, running and debugging Python code running in an external application called 'Studio'. Among other things, our plugin provides a button 'start debug trace of Studio' which runs pydevd.settrace() in Studio, to connect back to the (running!) pydev debug server. Currently, however, before pressing 'start debug trace of Studio' the user must have pressed the button 'pydev:start pydev debug server' exactly once, otherwise it will not work, nor will retrying start pydev debug server + start debug trace. (Nor does start+stop+start of pydev debug server). Once it has gone wrong in this way, there appears to be no way to recover except restarting Eclipse. Therefore we would like to robustify this: when pressing our 'start debug trace of Studio' we would like our plugin also to activate pydev server if it has not already been done, and generally help or at least inform/warn when things are are about to go wrong. Are there any api calls for starting the pydev debug server, or probing its state? Any help and hints with this would be greatly appreciated! We are currently using pydev+extensions 1.4.4 , with eclipse 3.4.1. Thanks in advance! -- Thomas Johnsson, Jeppesen Systems, Göteborg, Sweden |
From: Fabio Z. <fa...@gm...> - 2009-07-08 23:01:57
|
Hi All, Pydev and Pydev Extensions 1.4.7 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions: ----------------------------------------------------------------- * The interactive console can be used on the remote debugger * Remote debugger properly redirects contents from the server on multiple runs. * Providing context-independent completions when other completions are not available (until now, it only gave those completions for method parameters) * The number of chars required to show the context-insensitive completion can now be customized. * Fixed problem with Eclipse 3.5: "Invalid Thread Access" when trying to rename a class Release Highlights in Pydev: ---------------------------------------------- * Iron Python support * Fixed issue when configuring interpreter on Eclipse 3.3 and 3.2 (was using API only available in 3.4) * Google App Engine o Popup menus for google app engine are now working with eclipse 3.2 o Fixed issues when google app engine project has spaces in path * Launching o Ctrl+F9 can be used to run as unit-test and select which tests will be run o F9 will now run the current editor based on the project type o Changed run icons o Run configurations can be created for the project o Run as unit-test can have --filter and --tests as a parameter set in the run configuration * Shift left can now shift even when there are less chars than the required indent string * Top-level modules on .egg files are now properly recognized * Auto-config fixed * Fixed problem when .pydevproject was not a parseable xml file (the pydev package explorer wouldn't work because of that) * When a new interpreter is created, it's properly selected in the tree * Code-completion better heuristic when analyzing function return that's called on self. * Code-completion in the interactive console now handles import sections correctly * Code formatter: Spaces after square and curly braces are no longer changed when an unary operator is found afterwards * Fixed problem when recognizing encodings (regexp was not correct) What is PyDev? --------------------------- PyDev is a plugin that enables users to use Eclipse for Python, Jython and Iron Python development -- making Eclipse a first class Python IDE -- It comes with many goodies such as code completion, syntax highlighting, syntax analysis, refactor, debug and many others. Cheers, -- Fabio Zadrozny ------------------------------------------------------ Software Developer Aptana http://aptana.com/python Pydev Extensions http://www.fabioz.com/pydev Pydev - Python Development Environment for Eclipse http://pydev.sf.net http://pydev.blogspot.com |
From: Fabio Z. <fa...@gm...> - 2009-06-23 02:19:10
|
> As far as i understand i cannot write a plug in for more completions since > the completion participant could only add global completions, which is not > what i need. > > I know in the general case is difficult to know what a participant should > get because he has to know the type of the activation token, like in: > <code> > a = SomeClass() > a.<--- CTRL + SPACE > </code> > > However in my case it might be enogh to just get the string used for > completion and then return a string which includes dots, like getting "a." > and returning "a.one_attribute". This is because i have close contact with > my users and I might explain them that they should do "SomeClass(). <--- > CTRL + SPACE" and only then separate to a different variable (It sounds > wierd but people is willing to accept this if there is no better option) > > In any case i understand that is not logical that you change your current > working plans to extend the IPyDevCompletionParticipant interface. > But i thought that if we could agree on some interface (and use case) I > could add the feature myself and send a patch to you. Actually, what I would think is that clients of IPyDevCompletionParticipant are called but already knowing about the information that could be resolved already. E.g.: in the token: mod1.mod2.ClassA.Foo. it could know that mod1.mod2.ClassA is already a given module/class and then just goes on asking clients to complete with Foo (which it doesn't know about). > Anyway, i will also try inspecting the solution of creating stubs and I tell > you after that. > > I am curious about the power of pydev, is it always able to index each > python function and its return value? is it able to understand functions > which have more than one return type? When it finds a = MyFunc() it'll go on to analyze the return statements available for that function and for each return it'll try to get the completions for that token (so, in that case, yes, it's able to properly understand functions which have more than one return type). > Also, are you planning to add support for parameter type deducing? Not currently... I already thought about that, but I have some concerns on whether it's feasible to do it with acceptable levels of performance. Cheers, Fabio > > Thank you > Marcelo > > On Mon, Jun 22, 2009 at 1:26 AM, Fabio Zadrozny <fa...@es...> wrote: >> >> > Hello. >> > My name is Marcelo Taube. >> >> Hello Marcelo, >> >> > One of the most important requirements for my users is completion >> > according >> > to our needs. The problems comes from two fronts >> > 1) In our python installation we have modules which were wrote by us in >> > the >> > C language, we would like our users to get proper completion proposals. >> > Logically this wont work in the initial installation because pydev has >> > not >> > python code to parse. >> > 2) Sometimes we would like our users to have completion on function >> > return >> > values and even concatenations like in " foo(3,4).bar([3,4],5).doit(). >> > ". >> > >> > If I am right the first problem might be solvable by just configuring >> > the >> > builtin completion in pydev (right?). The second problem is not problem >> > with >> > most of python code since i saw that pydev has good code analysis. >> > However >> > both together are a problem since I don't think pydev is able to check >> > the >> > return type of function written in C. >> >> You're right: >> - You can configure the forced builtins to do what you want by >> spawning a shell and dynamically analyzing your dlls ( >> http://fabioz.com/pydev/manual_101_interpreter.html ) >> - pydev has no way of getting return types of c-functions (that's not >> available in the shell code-completion introspection -- right now, >> sometimes pydev is able to get the arguments by analyzing the >> docstrings from those dlls, but that's also not always available) >> >> > If there is a current solution to this i want to know. But in any case i >> > would like to be able to add my own completions in order to be able to >> > fix >> > problems if they appear. >> > >> > I think there might be two approaches, one is being able to connect to >> > the >> > logical engine of pydev and suppling extra information like the return >> > type >> > of some functions. The other approach would be to supply textual >> > completions >> > by a separate engine. >> > >> > I have not discarded the first approach but it seems to be easier to >> > implement the second one since i noticed that you have an extension >> > point in >> > pydev to add completions participants, so i started investigating that >> > option. >> >> There are plans to add a way to the engine so that you can provide a >> file with the completions -- right now you could probably generate >> python stubs for the c code you have and add those as a .zip to the >> pythonpath -- but creating a plugin to add more completions would >> surely work too. >> >> > I have studyed a little the code of pydev as a way of learning. since i >> > have >> > not found material about the desing of your completion and how to extend >> > it. >> > I readed the classes PyCodeCompletion, PythonCompletionProcessor, >> > CompletionState, CompletionRequest and most important >> > IPyDevCompletionParticipant. >> > Please correct me if i am not learning in the proper way. >> >> Reading the code/asking in the list is really the best way of doing it. >> >> > I also wrote a kind of example completion participant to add some dumb >> > completion. >> > My example would always return a token for the completion 'abcdef', not >> > depending in the activation token. It seems that pydev correctly filters >> > out >> > the completion if the activation token is not a prefix of the proposal. >> > Anyway, the example worked, but now I found an extra problem. PyDev >> > would >> > only allow me to add completion proposals to global variables but would >> > not >> > allow me to give proposals which include dots. If i return the proposal >> > 'abcdef.ghi' and the user writes 'abcedf.' + Ctrl +Space my proposal >> > does >> > not appear. >> > After some debugging i noticed my code is never called and after reading >> > what is happening in PyCodeCompletion i realized that there two distinct >> > cases, one for global variables and one for tokens. It seems that in the >> > second case contributors are never called. Is that a bug? >> >> It's more like a feature-request (as you can see in >> IPyDevCompletionParticipant, it specifically names the methods for >> globals and arguments) -- also, when getting things from a token, you >> usually need to know more things, such as what that token actually >> represents, so, the code-completion for clients there would need good >> use-cases to know what would be needed for a client to properly do a >> code-completion there. >> >> > Thank you for your time and your answers, i hope you can help me and >> > also >> > that i will be able to contribute back for this help. >> >> ;-) >> >> Cheers, >> >> Fabio >> >> >> ------------------------------------------------------------------------------ >> Are you an open source citizen? Join us for the Open Source Bridge >> conference! >> Portland, OR, June 17-19. Two days of sessions, one day of unconference: >> $250. >> Need another reason to go? 24-hour hacker lounge. Register today! >> >> http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org >> _______________________________________________ >> pydev-code mailing list >> pyd...@li... >> https://lists.sourceforge.net/lists/listinfo/pydev-code > > > ------------------------------------------------------------------------------ > Are you an open source citizen? Join us for the Open Source Bridge > conference! > Portland, OR, June 17-19. Two days of sessions, one day of unconference: > $250. > Need another reason to go? 24-hour hacker lounge. Register today! > http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org > _______________________________________________ > pydev-code mailing list > pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code > > |
From: Marcelo T. <mai...@gm...> - 2009-06-22 05:55:21
|
Fabio, Thank you for your fast answer. As far as i understand i cannot write a plug in for more completions since the completion participant could only add global completions, which is not what i need. I know in the general case is difficult to know what a participant should get because he has to know the type of the activation token, like in: <code> a = SomeClass() a.<--- CTRL + SPACE </code> However in my case it might be enogh to just get the string used for completion and then return a string which includes dots, like getting "a." and returning "a.one_attribute". This is because i have close contact with my users and I might explain them that they should do "SomeClass(). <--- CTRL + SPACE" and only then separate to a different variable (It sounds wierd but people is willing to accept this if there is no better option) In any case i understand that is not logical that you change your current working plans to extend the IPyDevCompletionParticipant interface. But i thought that if we could agree on some interface (and use case) I could add the feature myself and send a patch to you. Anyway, i will also try inspecting the solution of creating stubs and I tell you after that. I am curious about the power of pydev, is it always able to index each python function and its return value? is it able to understand functions which have more than one return type? Also, are you planning to add support for parameter type deducing? Thank you Marcelo On Mon, Jun 22, 2009 at 1:26 AM, Fabio Zadrozny <fa...@es...> wrote: > > Hello. > > My name is Marcelo Taube. > > Hello Marcelo, > > > One of the most important requirements for my users is completion > according > > to our needs. The problems comes from two fronts > > 1) In our python installation we have modules which were wrote by us in > the > > C language, we would like our users to get proper completion proposals. > > Logically this wont work in the initial installation because pydev has > not > > python code to parse. > > 2) Sometimes we would like our users to have completion on function > return > > values and even concatenations like in " foo(3,4).bar([3,4],5).doit(). ". > > > > If I am right the first problem might be solvable by just configuring the > > builtin completion in pydev (right?). The second problem is not problem > with > > most of python code since i saw that pydev has good code analysis. > However > > both together are a problem since I don't think pydev is able to check > the > > return type of function written in C. > > You're right: > - You can configure the forced builtins to do what you want by > spawning a shell and dynamically analyzing your dlls ( > http://fabioz.com/pydev/manual_101_interpreter.html ) > - pydev has no way of getting return types of c-functions (that's not > available in the shell code-completion introspection -- right now, > sometimes pydev is able to get the arguments by analyzing the > docstrings from those dlls, but that's also not always available) > > > If there is a current solution to this i want to know. But in any case i > > would like to be able to add my own completions in order to be able to > fix > > problems if they appear. > > > > I think there might be two approaches, one is being able to connect to > the > > logical engine of pydev and suppling extra information like the return > type > > of some functions. The other approach would be to supply textual > completions > > by a separate engine. > > > > I have not discarded the first approach but it seems to be easier to > > implement the second one since i noticed that you have an extension point > in > > pydev to add completions participants, so i started investigating that > > option. > > There are plans to add a way to the engine so that you can provide a > file with the completions -- right now you could probably generate > python stubs for the c code you have and add those as a .zip to the > pythonpath -- but creating a plugin to add more completions would > surely work too. > > > I have studyed a little the code of pydev as a way of learning. since i > have > > not found material about the desing of your completion and how to extend > it. > > I readed the classes PyCodeCompletion, PythonCompletionProcessor, > > CompletionState, CompletionRequest and most important > > IPyDevCompletionParticipant. > > Please correct me if i am not learning in the proper way. > > Reading the code/asking in the list is really the best way of doing it. > > > I also wrote a kind of example completion participant to add some dumb > > completion. > > My example would always return a token for the completion 'abcdef', not > > depending in the activation token. It seems that pydev correctly filters > out > > the completion if the activation token is not a prefix of the proposal. > > Anyway, the example worked, but now I found an extra problem. PyDev would > > only allow me to add completion proposals to global variables but would > not > > allow me to give proposals which include dots. If i return the proposal > > 'abcdef.ghi' and the user writes 'abcedf.' + Ctrl +Space my proposal does > > not appear. > > After some debugging i noticed my code is never called and after reading > > what is happening in PyCodeCompletion i realized that there two distinct > > cases, one for global variables and one for tokens. It seems that in the > > second case contributors are never called. Is that a bug? > > It's more like a feature-request (as you can see in > IPyDevCompletionParticipant, it specifically names the methods for > globals and arguments) -- also, when getting things from a token, you > usually need to know more things, such as what that token actually > represents, so, the code-completion for clients there would need good > use-cases to know what would be needed for a client to properly do a > code-completion there. > > > Thank you for your time and your answers, i hope you can help me and also > > that i will be able to contribute back for this help. > > ;-) > > Cheers, > > Fabio > > > ------------------------------------------------------------------------------ > Are you an open source citizen? Join us for the Open Source Bridge > conference! > Portland, OR, June 17-19. Two days of sessions, one day of unconference: > $250. > Need another reason to go? 24-hour hacker lounge. Register today! > > http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org > _______________________________________________ > pydev-code mailing list > pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code > |
From: Fabio Z. <fa...@es...> - 2009-06-21 22:26:32
|
> Hello. > My name is Marcelo Taube. Hello Marcelo, > One of the most important requirements for my users is completion according > to our needs. The problems comes from two fronts > 1) In our python installation we have modules which were wrote by us in the > C language, we would like our users to get proper completion proposals. > Logically this wont work in the initial installation because pydev has not > python code to parse. > 2) Sometimes we would like our users to have completion on function return > values and even concatenations like in " foo(3,4).bar([3,4],5).doit(). ". > > If I am right the first problem might be solvable by just configuring the > builtin completion in pydev (right?). The second problem is not problem with > most of python code since i saw that pydev has good code analysis. However > both together are a problem since I don't think pydev is able to check the > return type of function written in C. You're right: - You can configure the forced builtins to do what you want by spawning a shell and dynamically analyzing your dlls ( http://fabioz.com/pydev/manual_101_interpreter.html ) - pydev has no way of getting return types of c-functions (that's not available in the shell code-completion introspection -- right now, sometimes pydev is able to get the arguments by analyzing the docstrings from those dlls, but that's also not always available) > If there is a current solution to this i want to know. But in any case i > would like to be able to add my own completions in order to be able to fix > problems if they appear. > > I think there might be two approaches, one is being able to connect to the > logical engine of pydev and suppling extra information like the return type > of some functions. The other approach would be to supply textual completions > by a separate engine. > > I have not discarded the first approach but it seems to be easier to > implement the second one since i noticed that you have an extension point in > pydev to add completions participants, so i started investigating that > option. There are plans to add a way to the engine so that you can provide a file with the completions -- right now you could probably generate python stubs for the c code you have and add those as a .zip to the pythonpath -- but creating a plugin to add more completions would surely work too. > I have studyed a little the code of pydev as a way of learning. since i have > not found material about the desing of your completion and how to extend it. > I readed the classes PyCodeCompletion, PythonCompletionProcessor, > CompletionState, CompletionRequest and most important > IPyDevCompletionParticipant. > Please correct me if i am not learning in the proper way. Reading the code/asking in the list is really the best way of doing it. > I also wrote a kind of example completion participant to add some dumb > completion. > My example would always return a token for the completion 'abcdef', not > depending in the activation token. It seems that pydev correctly filters out > the completion if the activation token is not a prefix of the proposal. > Anyway, the example worked, but now I found an extra problem. PyDev would > only allow me to add completion proposals to global variables but would not > allow me to give proposals which include dots. If i return the proposal > 'abcdef.ghi' and the user writes 'abcedf.' + Ctrl +Space my proposal does > not appear. > After some debugging i noticed my code is never called and after reading > what is happening in PyCodeCompletion i realized that there two distinct > cases, one for global variables and one for tokens. It seems that in the > second case contributors are never called. Is that a bug? It's more like a feature-request (as you can see in IPyDevCompletionParticipant, it specifically names the methods for globals and arguments) -- also, when getting things from a token, you usually need to know more things, such as what that token actually represents, so, the code-completion for clients there would need good use-cases to know what would be needed for a client to properly do a code-completion there. > Thank you for your time and your answers, i hope you can help me and also > that i will be able to contribute back for this help. ;-) Cheers, Fabio |
From: Marcelo T. <mai...@gm...> - 2009-06-21 01:00:56
|
Hello. My name is Marcelo Taube. In my organization we use python a lot. I am in charge of the python environment and do some tool development or installing for my users. We have decided we will install Pydev and probably acquire a Pydev extensions license. The environment will be heavily used inside our company. In spite of pydev being quite good we have decided that we need some extra features, I think that some of the features require that I develop a plugin extension to pydev and some other might just be solved by better configuration. I know that some of the extensions I will write will be insteresting to pydev and maybe you will accept a patch in the future, some others will be too specific to my company. This mail is to ask for some initial advise on one of the issues I am interested. One of the most important requirements for my users is completion according to our needs. The problems comes from two fronts 1) In our python installation we have modules which were wrote by us in the C language, we would like our users to get proper completion proposals. Logically this wont work in the initial installation because pydev has not python code to parse. 2) Sometimes we would like our users to have completion on function return values and even concatenations like in " foo(3,4).bar([3,4],5).doit(). ". If I am right the first problem might be solvable by just configuring the builtin completion in pydev (right?). The second problem is not problem with most of python code since i saw that pydev has good code analysis. However both together are a problem since I don't think pydev is able to check the return type of function written in C. If there is a current solution to this i want to know. But in any case i would like to be able to add my own completions in order to be able to fix problems if they appear. I think there might be two approaches, one is being able to connect to the logical engine of pydev and suppling extra information like the return type of some functions. The other approach would be to supply textual completions by a separate engine. I have not discarded the first approach but it seems to be easier to implement the second one since i noticed that you have an extension point in pydev to add completions participants, so i started investigating that option. I have studyed a little the code of pydev as a way of learning. since i have not found material about the desing of your completion and how to extend it. I readed the classes PyCodeCompletion, PythonCompletionProcessor, CompletionState, CompletionRequest and most important IPyDevCompletionParticipant. Please correct me if i am not learning in the proper way. I also wrote a kind of example completion participant to add some dumb completion. My example would always return a token for the completion 'abcdef', not depending in the activation token. It seems that pydev correctly filters out the completion if the activation token is not a prefix of the proposal. Anyway, the example worked, but now I found an extra problem. PyDev would only allow me to add completion proposals to global variables but would not allow me to give proposals which include dots. If i return the proposal 'abcdef.ghi' and the user writes 'abcedf.' + Ctrl +Space my proposal does not appear. After some debugging i noticed my code is never called and after reading what is happening in PyCodeCompletion i realized that there two distinct cases, one for global variables and one for tokens. It seems that in the second case contributors are never called. Is that a bug? Thank you for your time and your answers, i hope you can help me and also that i will be able to contribute back for this help. An thanks to Fabio for all the completion code he wrote :) Have a nice day, Marcelo Taube |
From: Raul F. H. <ra...@em...> - 2009-06-02 19:35:48
|
Hi Fabio, yes, I have some problems. In fact, the name of python exec seems to be the ID of an InterpreterInfo. For example, you still use the name of python exec to obtain an InterpreterInfo from a collection (e.g., on AbstractInterpreterManager#hasInfoOnIntrepreter and also on AbstractInterpreterManager#internalCreateInterpreterInfo). As you said, we have to keep it to remain backwards compatible. Then, instead of a String, why don't we use an object to properly select the correct ID? Or, if such object tries to initialize from existent interpreters (using InterpreterInfo#fromString), and the interpreter still remains on old format (without the name), such object can initialize the name as its exec name (just a tip). Best regards, --Raul On Wed, May 27, 2009 at 6:03 PM, Fabio Zadrozny <fa...@gm...> wrote: > Hi Raul, > > That depends on the place. Internally it can use both to access it > from many places (to remain backwards compatible). Are you > experiencing some problem regarding that? > > Cheers, > > Fabio > > On Wed, May 27, 2009 at 12:04 PM, Raul Fernandes Herbster > <ra...@em...> wrote: > > Hi Fabio, > > > > on latest PyDev, the user can now define a name for its interpreter. > > However, PyDev still uses internally the exec name of the interpreter as > ID > > of the InterpreterInfo. Is this an accident or intentional? > > > > []'s > > --Raul > > > |
From: Fabio Z. <fa...@gm...> - 2009-05-27 21:04:21
|
Hi Raul, That depends on the place. Internally it can use both to access it from many places (to remain backwards compatible). Are you experiencing some problem regarding that? Cheers, Fabio On Wed, May 27, 2009 at 12:04 PM, Raul Fernandes Herbster <ra...@em...> wrote: > Hi Fabio, > > on latest PyDev, the user can now define a name for its interpreter. > However, PyDev still uses internally the exec name of the interpreter as ID > of the InterpreterInfo. Is this an accident or intentional? > > []'s > --Raul > |
From: Raul F. H. <ra...@em...> - 2009-05-27 15:04:30
|
Hi Fabio, on latest PyDev, the user can now define a name for its interpreter. However, PyDev still uses internally the exec name of the interpreter as ID of the InterpreterInfo. Is this an accident or intentional? []'s --Raul |
From: Fabio Z. <fa...@gm...> - 2009-05-20 23:45:18
|
Hi All, Pydev and Pydev Extensions 1.4.6 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions: ----------------------------------------------------------------- * Auto-import for from __future__ import with_statement will add a 'with' token instead of a with_statement token * Globals browser improved (only for Eclipse 3.3 onwards, older versions will have the old interface): o Can filter with working sets o Can match based on module names. E.g.: django.A would match all the django classes/methods/attributes starting with 'A' Release Highlights in Pydev 1.4.6: ---------------------------------------------- * Google App Engine: customized setup and management of Google App Engine projects * String substitution variables can be used for pythonpath and launch config. * The interpreter can be referred from a user-editable name * Submodules shown on import completion (e.g.: from x|<-- request completion here will show xml, xml.dom, xml.etree, etc) * os.path added to default forced builtins * Showing better errors when code-completion fails * Fixed problem finding definition for java class when the constructor was referenced. * Fixed recursion error on Python 3.0 grammar * Jython debugger - local variables are properly updated * Multiple forced builtins can be added/removed at once * Python 2.6 grammar: kwarg after unpacking arg list * Python 3.0 grammar: star expr on for * Fixed problem on code-completion when file is not in the workspace (SystemASTManager cannot be cast to ASTManager) * Not throwing IllegalCharsetNameEx on illegal encoding declaration anymore (patch by Radim Kubacki) * __future__ imports are always added/reorganized as the 1st import in the module * Code-completion in Jython recognizes that a method get/setName should be available as a 'name' property. * Finding 'objects' for django * Pydev Package Explorer o Added filter for the python nodes o Showing configuration errors o Showing the interpreter info What is PyDev? --------------------------- PyDev is a plugin that enables users to use Eclipse for Python and Jython development -- making Eclipse a first class Python IDE -- It comes with many goodies such as code completion, syntax highlighting, syntax analysis, refactor, debug and many others. Cheers, -- Fabio Zadrozny ------------------------------------------------------ Software Developer Aptana http://aptana.com/python Pydev Extensions http://www.fabioz.com/pydev Pydev - Python Development Enviroment for Eclipse http://pydev.sf.net http://pydev.blogspot.com |
From: Fabio Z. <fa...@gm...> - 2009-04-12 22:34:54
|
Hi All, Pydev and Pydev Extensions 1.4.5 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions: ----------------------------------------------------------------- * Derived resources are no longer analyzed * No longer giving spurios warnings when file being analyzed is removed Release Highlights in Pydev: ---------------------------------------------- * Better error handling in the grammar * Code Formatter o Can be applied from context menu (recursively applied for folders) o Can trim whitespaces from the end of the lines o Can add new a line to the end of the file o Can automatically apply code-formatting on save o Fixed issues with unary operators and exponential o Fixed issues where parenthesis was lost if no closing parenthesis was available * Python 3.0 o Parser supporting unicode identifiers o Star expr recognized * Python 3.1 version acknowledged (and proper grammar used) * Pydev package explorer o Can show working sets as top-level elements o Folders without __init__.py are no longer shown as packages * Interactive console o When waiting for user input, the prompt is not shown o Console initial commands compatible with Python 3.0 o Timeout for starting console communication while the shell is not fully initilized o More info is available if connection fails * Alt+R working (mnemonics set for pydev contributed menus) * With Ctrl+2, matches will no longer take into acount the case * Code completion: Can get args from docstring when '*' is present * Better heuristics for automatic insertion of "self" and "import" * Fixed problem configuring external jars and zip files * Launch getting interpreter from project on default config * After a parenthesis, 'n' indentation levels may be applied (patch by Radim Kubacki) * .pyc files are now marked as derived (note that this will only happen when they're changed) * Fixed debugger issue with Jython 2.5b3 * Jython: completions working for static members access * Hover works on Eclipse 3.2 What is PyDev? --------------------------- PyDev is a plugin that enables users to use Eclipse for Python and Jython development -- making Eclipse a first class Python IDE -- It comes with many goodies such as code completion, syntax highlighting, syntax analysis, refactor, debug and many others. Cheers, -- Fabio Zadrozny ------------------------------------------------------ Software Developer Aptana http://aptana.com/python Pydev Extensions http://www.fabioz.com/pydev Pydev - Python Development Enviroment for Eclipse http://pydev.sf.net http://pydev.blogspot.com |
From: Cynebeald <cyn...@na...> - 2009-03-27 12:28:58
|
Hi, Thanks, I was afraid I'd have to look into the source itself - at least I know now that its pointless to try to do this via scripting. I hope it's going to be possible to reuse the python parser for blocks of python code. Cynebeald > -----Original Message----- > From: Fabio Zadrozny [mailto:fa...@es...] > Sent: 26. brezna 2009 22:59 > To: pyd...@li... > Subject: Re: [Pydev-code] Embedding python in a DSL in PyDev > > > To do this you'd need to go into the Pydev sources -- and you have to > create a parser that can validate the RenPy syntax properly and use it > instead of the Pydev parser. If the structure is logically similar to > the Python structure, it should just provide an AST in the same way > that Pydev provides for Python -- if it's not, the logical structure > might have to be expanded for the additional structures. > > Cheers, > > Fabio > > On Wed, Mar 25, 2009 at 11:33 AM, Cynebeald > <cyn...@na...> wrote: > > Hello, > > I'd like to ask how hard it would be to embed python in another language > > (RenPy). That language has mostly it's own syntax (indentation > based), but > > it's possible to switch to pure python (either starting a > statement with $, > > or putting code in a python: block). Or to put it another way, RenPy is > > syntactic sugar to a python API, but it's possible to use the API (and > > python) directly. I tried opening a rpy file in PyDev, and syntax > > highlighting works OK, but the parser chokes on the first line > because it > > encounters some special syntax it doesn't understand. > > > > Could this be scripted via jython, or will it be necessary to > go into pydev > > sources? > > Regards, > > Cynebeald > > > > > > > ------------------------------------------------------------------ > ------------ > > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > > easily build your RIAs with Flex Builder, the Eclipse(TM)based > development > > software that enables intelligent coding and step-through debugging. > > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > > _______________________________________________ > > pydev-code mailing list > > pyd...@li... > > https://lists.sourceforge.net/lists/listinfo/pydev-code > > > > ------------------------------------------------------------------ > ------------ > _______________________________________________ > pydev-code mailing list > pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code > |
From: Fabio Z. <fa...@es...> - 2009-03-26 21:59:11
|
To do this you'd need to go into the Pydev sources -- and you have to create a parser that can validate the RenPy syntax properly and use it instead of the Pydev parser. If the structure is logically similar to the Python structure, it should just provide an AST in the same way that Pydev provides for Python -- if it's not, the logical structure might have to be expanded for the additional structures. Cheers, Fabio On Wed, Mar 25, 2009 at 11:33 AM, Cynebeald <cyn...@na...> wrote: > Hello, > I'd like to ask how hard it would be to embed python in another language > (RenPy). That language has mostly it's own syntax (indentation based), but > it's possible to switch to pure python (either starting a statement with $, > or putting code in a python: block). Or to put it another way, RenPy is > syntactic sugar to a python API, but it's possible to use the API (and > python) directly. I tried opening a rpy file in PyDev, and syntax > highlighting works OK, but the parser chokes on the first line because it > encounters some special syntax it doesn't understand. > > Could this be scripted via jython, or will it be necessary to go into pydev > sources? > Regards, > Cynebeald > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > pydev-code mailing list > pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code > |
From: Cynebeald <cyn...@na...> - 2009-03-25 15:01:44
|
Hello, I'd like to ask how hard it would be to embed python in another language (RenPy). That language has mostly it's own syntax (indentation based), but it's possible to switch to pure python (either starting a statement with $, or putting code in a python: block). Or to put it another way, RenPy is syntactic sugar to a python API, but it's possible to use the API (and python) directly. I tried opening a rpy file in PyDev, and syntax highlighting works OK, but the parser chokes on the first line because it encounters some special syntax it doesn't understand. Could this be scripted via jython, or will it be necessary to go into pydev sources? Regards, Cynebeald |
From: Raul F. H. <ra...@em...> - 2009-03-18 20:19:08
|
It worked for me. Thanks :) []'s On Wed, Mar 18, 2009 at 4:58 PM, Fabio Zadrozny <fa...@gm...> wrote: > Yes, there is. > > It wasn't commited. So, I'm just commiting it now -- note that it can > take some time before it appears in the non-developers svn, so, I'm > attaching those files. Just place them on > org.python.pydev.runalltests/src/org.python.pydev.runalltests, then > right click > run as > (junit test or junit workbench test) depending > on whether you're running the workbench tests or not. > > The manifest was also wrong (and is also attached) > > The svn must be at version 2705. > > Cheers, > > Fabio > > On Wed, Mar 18, 2009 at 3:55 PM, Raul Fernandes Herbster > <ra...@em...> wrote: > > Hi, > > > > is there any test suite for pydev tests, so I can just one class :) ? I > > looked for one, but no success. In addition, plugin > > org.python.pydev.runalltests doesn't work either. > > > > []'s > > --Raul > > > > -- > > Raul Fernandes Herbster > > Embedded and Pervasive Computing Laboratory - embedded.ufcg.edu.br > > Electrical Engineering and Informatics Center - CEEI > > Federal University of Campina Grande - UFCG - www.ufcg.edu.br > > Caixa Postal 10105 > > 58109-970 Campina Grande - PB - Brasil > > > |
From: Fabio Z. <fa...@gm...> - 2009-03-18 19:58:20
|
Yes, there is. It wasn't commited. So, I'm just commiting it now -- note that it can take some time before it appears in the non-developers svn, so, I'm attaching those files. Just place them on org.python.pydev.runalltests/src/org.python.pydev.runalltests, then right click > run as > (junit test or junit workbench test) depending on whether you're running the workbench tests or not. The manifest was also wrong (and is also attached) The svn must be at version 2705. Cheers, Fabio On Wed, Mar 18, 2009 at 3:55 PM, Raul Fernandes Herbster <ra...@em...> wrote: > Hi, > > is there any test suite for pydev tests, so I can just one class :) ? I > looked for one, but no success. In addition, plugin > org.python.pydev.runalltests doesn't work either. > > []'s > --Raul > > -- > Raul Fernandes Herbster > Embedded and Pervasive Computing Laboratory - embedded.ufcg.edu.br > Electrical Engineering and Informatics Center - CEEI > Federal University of Campina Grande - UFCG - www.ufcg.edu.br > Caixa Postal 10105 > 58109-970 Campina Grande - PB - Brasil > |
From: Raul F. H. <ra...@em...> - 2009-03-18 18:55:17
|
Hi, is there any test suite for pydev tests, so I can just one class :) ? I looked for one, but no success. In addition, plugin org.python.pydev.runalltests doesn't work either. []'s --Raul -- Raul Fernandes Herbster Embedded and Pervasive Computing Laboratory - embedded.ufcg.edu.br Electrical Engineering and Informatics Center - CEEI Federal University of Campina Grande - UFCG - www.ufcg.edu.br Caixa Postal 10105 58109-970 Campina Grande - PB - Brasil |
From: Fabio Z. <fa...@es...> - 2009-03-16 02:11:49
|
On Thu, Mar 12, 2009 at 8:49 AM, İsmail Dönmez <is...@na...> wrote: > Hi; > > I am trying to mimic emacs' tab indentation behaviour. Consider the > following snippet: > > def foo(): > bar = 0 > baz = 0 > > now if I place the cursor before baz and press tab key it adds another > tab which results in; > > def foo(): > bar = 0 > baz = 0 > > which doesn't look correct. What I expected would be no change in > spacing. Eclipse call this behaviour "Fix indentation" (CTRL-I by > default). It only indents when necessary it doesn't blindly add tabs. > > Is there a way to get this behaviour in pydev? Not currently (aside from using Ctrl+I), please report that as a feature request (should not be difficult to do). Cheers, Fabio |
From: İsmail D. <is...@na...> - 2009-03-12 12:51:52
|
Hi; I am trying to mimic emacs' tab indentation behaviour. Consider the following snippet: def foo(): bar = 0 baz = 0 now if I place the cursor before baz and press tab key it adds another tab which results in; def foo(): bar = 0 baz = 0 which doesn't look correct. What I expected would be no change in spacing. Eclipse call this behaviour "Fix indentation" (CTRL-I by default). It only indents when necessary it doesn't blindly add tabs. Is there a way to get this behaviour in pydev? Thanks. -- İsmail DÖNMEZ |
From: Fabio Z. <fa...@gm...> - 2009-03-04 02:37:46
|
> As I explained a couple of weeks ago, I need a suitable Python interpreter. > For example, I need to launch the information about the modules of a certain > Python interpreter on a remote environment, for example. Then, a different > method to obtain such information are necessary. This was already resolved > (I had to implement another class from AbstractInterpreterManager). > > However, I faced another problem: depending of the remote environment (for > example: a) installed on the same machine, but accessed through different > commands or b) installed on a remote machine, and accessed though SSH > commands), the InterpreterInfos of a certain python interpreter can be > obtained in different ways (my XXInterpreterManager knows how to deal with > it). The point is that Pydev is using the path to the project's interpreter > (from PythonNature#getProjectInterpreter) as the key to finding its unique > configuration (ID == path location == executable). In a nutshell: why don't > the python interpreter, instead of a string, can be implemented as a class > (with attributes , such as display string, the path location and the ID)? > And, on AbstractInterpreterManager#internalCreateInterpreterInfo(), instead > of using a executable, can receive a PytonInterpreter (the new class)? I'm > just finish a patch to sent you and wait for comments :) That seems fine for me. Please add a patch to the sourceforge tracker (but please make sure that it is backward compatible and users won't loose all their configured interpreters). Cheers, Fabio |
From: Raul F. H. <ra...@em...> - 2009-03-02 21:16:29
|
Hi, congratulations for the latest release... important features were implemented :) As I explained a couple of weeks ago, I need a suitable Python interpreter. For example, I need to launch the information about the modules of a certain Python interpreter on a remote environment, for example. Then, a different method to obtain such information are necessary. This was already resolved (I had to implement another class from AbstractInterpreterManager). However, I faced another problem: depending of the remote environment (for example: a) installed on the same machine, but accessed through different commands or b) installed on a remote machine, and accessed though SSH commands), the InterpreterInfos of a certain python interpreter can be obtained in different ways (my XXInterpreterManager knows how to deal with it). The point is that Pydev is using the path to the project's interpreter (from PythonNature#getProjectInterpreter) as the key to finding its unique configuration (ID == path location == executable). In a nutshell: why don't the python interpreter, instead of a string, can be implemented as a class (with attributes , such as display string, the path location and the ID)? And, on AbstractInterpreterManager#internalCreateInterpreterInfo(), instead of using a executable, can receive a PytonInterpreter (the new class)? I'm just finish a patch to sent you and wait for comments :) []'s --Raul |