tags:

views:

2408

answers:

6

I just configured Eclipse with PyDev latest version, but when I import external modules, neither code completion nor syntax highlighting works. How do I enable it?

Komodo Edit does a better synax highlighting, apparently. - But Ctrl+R doesnt run the program.

I prefer a SciTE kind of editor with similar highlighting and fonts (aesthetics) and F5 working but with display of folder and files dynamically like Komodo Edit and a better code completion and vi emulation. Suggestions, please.

If I want to buy a Py IDE, Komodo or Wingware, which is better?-- Wrt syntax highlighting and code completion

+3  A: 

To enable code completion, go to Window > Preferences > Pydev > Editor > Code Completion, and check the 'Use Code Completion?' box, as well as the other boxes for what you want to complete on. It seems to take a second to load, the first time it has to complete something.

Syntax coloring should just work by default. Right-click on the file in the package explorer, go to 'Open With', and make sure you're opening it with the Python Editor, and not the regular Text Editor.

I don't know exactly what you mean by importing external modules. I have my source in a separate directory structure on disk; my PyDev projects contain folders linked to those. Code completion works for that, as well as other modules like 'os'. If you're having troubles, are the modules added to the PyDev's Python search path (not necessarily the same as the regular one)?

I took a brief look at Komodo and Wingware a while back, so I can't answer the second part of your question. But ended up going with PyDev. I'm not a big fan of Eclipse, but PyDev works reasonably well for me.

DNS
This question and answer led me to how to turn on all the intelisense features I was missing. Thanks.
optician
A: 

Well, I tried the Wing Professional and I think its really the best Py IDE out there.

Lakshman Prasad
A: 

Between komodo and wingide i would go for wing. The license is not that expensive and the fact that it is commercial gives you a bigger probability of more updates and bug fixes. If you, like me, prefer a free solution, then stick with pydev. At least until aptana closes the free door :)

A: 

DNS, I have try:

Python 3.1 Pydev 1.4.3 Eclipse 3.3.2

The code completion doesn't work.

I use worong version or not?

Thanks.

A: 

Check to see if the 'P' icon is appearing for your items and in the top of your editor after opening it. If it's not appearing, it may be that there's a problem with the file association, so, go to window > preferences > general > editors > file associations and make sure that the .py files are associated with the Python Editor (note that because of an eclipse bug, if it seems correct, you may have to remove the association and add it again)

Fabio Zadrozny
A: 

The typical reason that code completion doesn't work under PyDev is that the libraries aren't in the PYTHONPATH. If you go into the Preferences, and setup PyDev PYTHONPATH preferences to include the places where the code you are trying to complete lives, it will work just fine...

Tim White