I've justed tagged version 0.5 of PySmell, the intellisense (or auto-completion, or omni-completion) provider for Python in github.
You can grab it here: http://github.com/orestis/pysmell/tree/v0.5
UPDATE: I've put up my lighting talk here: http://orestis.gr/static/downloads/pysmell-lightningtalk.pdf
PySmell was received with great joy in Pycon UK, I even won the award for the best lightning talk!
As usual in these kinds of situations, I then found out that there's an infinite loop when there is no PYSMELLTAGS file in the root of your project. I guess this may have put some people off. Fortunately the fix was easy (although this code isn't tested at all - I guess this is the reason it has bugs in the first place), so I tagged version 0.5
I'll be putting up my slides, as I think they give a nice overview of PySmell.
Comments
Comment by Orestis Markou , 1 year, 4 months ago :
Heh, if only I was using emacs :)
Seriously, I have a branch brewing somewhere that plans to extract all the vim specific stuff out (there's not too many of them) and allow people to plug their own factories.
The integration itself has to be done by an avid user of emacs, because I don't have the faintest idea about where to start. (Does emacs even support this kind of thing? I'd guess that you could hack it in anyway...)
Comment by Henning , 1 year, 4 months ago :
How does it compare to the codeassist module in Rope (http://rope.sf.net) ?
Comment by Orestis Markou , 1 year, 4 months ago :
Henning: I've no idea, I could never make rope to work. This is partly why I've chosen to roll my own.
Some key differences:
PySmell just provides autocompletion, Rope claims to do much more.
PySmell works on Python 2.4, Rope requires 2.5
PySmell works for me, Rope doesn't :)
Comment by cartman , 1 year, 4 months ago :
FWIW rope doesn't work with PyQt4, it doesn't autocomplete PyQt4 classes that is. I'll give PySmell a try in VIM with PyQt4.
Regards,
ismail
Comment by Henning , 1 year, 4 months ago :
cartman: I got autocomplete for PyQt4 working with Rope inside Eric4 by adding the modules in the rope project configration:
prefs['extension_modules'] = ["PyQt4",
"PyQt4.QtGui", "QtGui", "PyQt4.QtCore", "QtCore", "PyQt4.QftScript", "QtScript"]
There you can also add modules like cStringIO.
Orestis: I found a post about pysmell from the rope author:
http://groups.google.com/group/rope-d...
Comment by zeptin , 1 year, 4 months ago :
Forgive me if I'm being stupid, but I was rummaging through pysmelltags.py to see if I could use it in a semi-IDE thing I'm working on, and I saw something that may be a bug. On line 45, in the 'process' function, 'fileList' is looped over. However, the 'argList' parameter in the function definition doesn't seem to be used anywhere in the function, and it seems logical to assume that it is in fact meant to be 'argList' that gets looped over. Typo, or just me overthinking things? :-p Either way, a really interesting piece of work. Looking forward to some more editor-agnostic goodness >.>
Comment by Orestis Markou , 1 year, 4 months ago :
Wow, that looks really weird. Indeed argList isn't used anywhere, and it seems that filelist is picked up from somewhere, because it seems that things are working fine - at least in my functional tests and in my personal usage.
For the editor-agnostic goodness: There are two functions in the vimhelper.py module that expect a vim instance; you can re-use their unit tests to write your own for your IDE. After that, you can convert the of dicts that are returned from findCompletions to something your IDE can use.
I have a branch called "splitVim" which I haven't really moved forward, but I was planning of having a "CompletionGenerator" class with a well defined API, so that people can plug in their own. If you have a specific format you're interested in, send me an email at orestis @ this domain, and I'll see what I can do :)
Comment by zeptin , 1 year, 4 months ago :
Heh, I don't really mind what the format is as long as it's not too complicated :-p Oh, and some documentation on the findCompletions function would be great. No rush though, I've cobbled together some code that mostly works. I'm just not too sure how the options tuple affects the output yet.
Comment by shoono , 1 year, 3 months ago :
Занимаюсь дизайном и хочу попросить автора orestis.gr отправить шаьлончик на мой мыил) Готов заплатить...
This post is older than 30 days and comments have been turned off.

Comment by cartman , 1 year, 4 months ago :
Waiting for Emacs integration :-)