Autocompletion and Interactive Tables in a Python IDE

Aspersieman aspersieman at gmail.com
Thu Jul 24 07:10:15 EDT 2008


>
> On Jul 24, 4:10 am, Aspersieman <aspersie... at gmail.com> wrote:
>   
>> Anthony wrote:
>>     
>>> Hi, I'm a FoxPro programmer, but I want to learn python before it's
>>> too late.  I do a lot of statistical programming, so I import SPSS
>>> into python.  In my opinion, the best features of Visual FoxPro 9.0
>>> were:
>>> a) Intellisense (tells you what classes/methods are available and what
>>> variables go into a function)
>>> b) Code Completion (guesses your code after four letters)
>>> c) Data-Orientation; multiple data sessions can be open, data can be
>>> viewed easily
>>>       
>>> Python's IDLE has only half of the first of these features.  I did a
>>> lot of searching and found the PyDev extensions for Eclipse's Python
>>> IDE, and found that they've got Intellisense.  I'm still missing b and
>>> c, and am getting extremely frustrated programming so slowly..
>>>       
>>> So two questions:
>>> Is there any package, gui, IDE, anything that will do FoxPro-style
>>> code completion?  If it works in Eclipse, even better..
>>> I can't find a good screenshot, but here's a better description:
>>> You type "BROW" and it pops up a window that says "BROWSE" ..at this
>>> point if you hit enter it completes the word..
>>>       
>>> and
>>>       
>>> How can I view open SPSS data in one of the Python GUIs?  Again,
>>> Eclipse would be the preference.
>>> Here's an example of how I'd like to browse the data:
>>> http://www.vfpconversion.com/ArticleImage.aspx?QuickID=0209071&Image=...
>>> I don't want to have to switch back and forth between Python and SPSS
>>> while I'm programming; I just want to stay in one of them..
>>>       
>>> What can I do?  I feel extremely inefficient when I don't have these
>>> three features..
>>>       
>>> Thanks in advance.
>>> --
>>> http://mail.python.org/mailman/listinfo/python-list
>>>       
>> You might want to try vim. It has a steep learning curve, but definitely
>> increases productivity _alot_.
>>
>> Here is a tutorial on setting up vim with :
>>     1) Code completion (intellisense) - including tooltips (!!!)
>>     2) Jump between your python code and the python class libraries.
>>     3) Syntax checking
>>     4) A handy source browser
>>     5) Debugging (using pdb)
>>     6) [All the other vim goodies - already included]
>> Above instructions available herehttp://blog.sontek.net/2008/05/11/python-with-a-modular-ide-vim/
>>
>> I have been using the above setup for a while and find it superior to
>> _any_ IDE I've ever worked with.
>>
>> I'm not sure what you mean by 'Data-Orientation' but I'm sure there's a
>> suitable alternative/replacement for it in vim.
>>
>> Regards
>>
>> Nicolaas
>>
>> --
>>     
Anthony wrote:
> FoxPro is data-oriented, which means that at any time you have any
> number of data sets open in the workspace and browse them immediately
> by running one line of code in the command window.  It's a really
> important feature in terms of efficiency; I don't want to have to move
> back and forth between SPSS and an IDE when I'm figuring out what code
> to write, that takes six keystrokes for what FoxPro can do in one.
> Again, here's what the BROWSE command presents:
>
> http://www.vfpconversion.com/ArticleImage.aspx?QuickID=0209071&Image=vfptoolkit_figure02.tif
>
>
> Does VIM have the capability to keep data open?  --  Do any of these
> IDEs have this browse capability??
I see what you mean by 'Data Oriented', however I'm not aware of such a
'data set' persistence functionality in vim. You can set up a similar
(to FoxPro) environment using DBExt [1] plugin in vim and by using its
(vims') built-in session functionality. To set up dbext for FoxPro in
vim you might need to use ODBC but it should be quite straight forward
provided you read the help.

I work on SQL Server (using python and vim) and frequently have many
queries result sets open that I'm busy with. When I have to go, all I do
is save my session in vim. When I return the next day, I open the
session, and it there I have all the queries (not the data sets they
return (however you can save that too)) and scripts etc, I was working
on. To execute a query (even one embedded in some python code) I merely
select the lines the query is on and type the key-mapping (I set up) to
execute the query (3 key strokes) and I can view the result set in a
split window below the current one.

The aforementioned vim setup for python [2] and the DBExt plugin for vim
give me all the functionality I need to develop python and/or database
applications/scripts in one editor (IDE?). Also, there are so many other
useful plugins [3] for vim I have no need of any other IDE (I've
replaced Visual Studio .Net with vim as my IDE for Asp.Net
applications). I'm sure that vim can meet all the required features you
wanted initially.

[1] http://www.vim.org/scripts/script.php?script_id=356
[2] here it is again :
http://blog.sontek.net/2008/05/11/python-with-a-modular-ide-vim/
[3] http://www.vim.org/scripts/script.php?script_id=1318 and
http://www.vim.org/scripts/script.php?script_id=910 and
http://vim.sourceforge.net/scripts/script.php?script_id=69 and
http://www.vim.org/scripts/script.php?script_id=1658

Hope this helps :)

Regards

Nicolaas

-- 

The three things to remember about Llamas:
1) They are harmless
2) They are deadly
3) They are made of lava, and thus nice to cuddle. 





More information about the Python-list mailing list