This might be a simple error, but I am struggling all afternoon with it, so I decided to look for help.
I have pydev and extensions (1.4.5.27.27) installed on eclipse (3.4.2.M20090211-1700). My system is Ubuntu 8.10 (kernel 2.6.27-11) with python 2.5.2.
I followed the Getting started guide to install and configure pydev, but still do not managed to get code completion working for builltin functions like open. When I include my python intepreter (/usr/bin/python) I get some libraries (13, not 50 as in "configuring the interpreter") and some forced bultins (around 25, __bultin__ included). I have the same results using "auto config".
I tried using the source folder created automatically by the New -> project... wizard. Or adding a source folder manually (File > new > other > pydev > source folde). Any way no luck with code-completion (I see some other options, but not the open).
Can anyone help me?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, open should come from the __builtin__, so, that might indicate that pydev is not being able to connect to the shell its spawns to get those completions... (in linux this usually happens because you have some firewall enabled that's preventing that communication or have problems with your network configuration)
Do you have some error in your error log? What are you seeing in the completions? Do you see other builtins (e.g.: RuntimeError / TypeError)?
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I decided to start from scratch with a clean eclipse install, having one just for pydev. Things look better now, code-completion show the bultins like open and RuntimeError. But I have another issue. For instance if I have:
def main():
....f = open("some-file")
And if I start to type "line = f.rea", shouldn't code completion give options like read, readline, etc.?
It seems that pydev does not recognize that the variable 'f' now is a file type, and so, does not give the right options for completion. Is this a normal behavior, or do I still have some issue with my install?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, there's some info that pydev has and some that it doesn't...
In the case of open: open is actually a method, and as python does not really give the type of the return, there's no real way to get it (I'm already studying on proving precompiled completions for some known cases... such as open(), but it's still 3-4 releases to have it).
Now, in the other way, if instead of using open() -- which is a method -- you used file() -- which is the class that open() actually uses, you'd have those completions because Pydev could recognize that it's a class and use introspection to get what it has.
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This might be a simple error, but I am struggling all afternoon with it, so I decided to look for help.
I have pydev and extensions (1.4.5.27.27) installed on eclipse (3.4.2.M20090211-1700). My system is Ubuntu 8.10 (kernel 2.6.27-11) with python 2.5.2.
I followed the Getting started guide to install and configure pydev, but still do not managed to get code completion working for builltin functions like open. When I include my python intepreter (/usr/bin/python) I get some libraries (13, not 50 as in "configuring the interpreter") and some forced bultins (around 25, __bultin__ included). I have the same results using "auto config".
I tried using the source folder created automatically by the New -> project... wizard. Or adding a source folder manually (File > new > other > pydev > source folde). Any way no luck with code-completion (I see some other options, but not the open).
Can anyone help me?
Well, open should come from the __builtin__, so, that might indicate that pydev is not being able to connect to the shell its spawns to get those completions... (in linux this usually happens because you have some firewall enabled that's preventing that communication or have problems with your network configuration)
Do you have some error in your error log? What are you seeing in the completions? Do you see other builtins (e.g.: RuntimeError / TypeError)?
Cheers,
Fabio
I decided to start from scratch with a clean eclipse install, having one just for pydev. Things look better now, code-completion show the bultins like open and RuntimeError. But I have another issue. For instance if I have:
def main():
....f = open("some-file")
And if I start to type "line = f.rea", shouldn't code completion give options like read, readline, etc.?
It seems that pydev does not recognize that the variable 'f' now is a file type, and so, does not give the right options for completion. Is this a normal behavior, or do I still have some issue with my install?
Well, there's some info that pydev has and some that it doesn't...
In the case of open: open is actually a method, and as python does not really give the type of the return, there's no real way to get it (I'm already studying on proving precompiled completions for some known cases... such as open(), but it's still 3-4 releases to have it).
Now, in the other way, if instead of using open() -- which is a method -- you used file() -- which is the class that open() actually uses, you'd have those completions because Pydev could recognize that it's a class and use introspection to get what it has.
Cheers,
Fabio