Hi Fabian, I changed the discussion's title because this is the occasion to mention one or two things regarding the code completion in the Editor, in general (not only for external libraries).
Code completion in the Editor is quite dumb in Spyder v1.x. Actually this is the Scintilla's code completion provided by QScintilla (when it's installed on your machine, otherwise you won't have any completion at all in the editor in v1.x), the PyQt4's extension module. It is quite dumb because it may be fooled very easily and it does not analyze code very deeply (even imported symbols with a 'from [...] import [...]' are not listed in completion list). However you may update the 'python.api' file (that is QScintilla's database on installed module objects) to take into account the specific Python modules installed on your machine. If you are on Windows, Python(x,y) includes an update script for Scite's 'python.api' file which is the same as Spyder's. This being said, I'm currently implementing a wonderful feature in the Editor for Spyder v2.0: that is the 'rope' library integration which provides a really good code completion (and calltips too), plus an option which I'm quite fond of: the 'go to definition' feature. So in Spyder v2.0, you will be able to do a Ctrl + left mouse click on a symbol in the editor, and go straightly to its definition, i.e. in another module eventually. These features will be available in the next minutes/hours from the Mercurial repository of Spyder v2.0. Feel free to test them! Cheers, Pierre On 30 juin, 19:19, Fabian <[email protected]> wrote: > Hi all, > > first of all I am really glad that IPython is now a component in > spyderlib. As I have worked with IPython for quite some time, I did > not want to get rid of it... > > Now for my question: > > I have trouble getting the code completion in spyderlib's editor > working completely. It does a good job when a python library module is > imported ("import os", then, "os." pops up a combo box). But it does > not offer any completion for external modules (e.g. vtk, dicom, > numpy), even though they are in the standard installation path (try > "import numpy", then type "numpy."). > > What is the trick here? > > Cheers, > > Fabian -- You received this message because you are subscribed to the Google Groups "spyder" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
