niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » python
python-mode tab completion problem
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
Author Message
Fernando Perez
*nix forums addict


Joined: 20 Feb 2005
Posts: 75

PostPosted: Thu Feb 03, 2005 10:10 pm    Post subject: Re: python-mode tab completion problem Reply with quote

Skip Montanaro wrote:

Quote:

test1dellboy3> I am exploring python-mode on emacs. When I open foo.py
test1dellboy3> in emacs and hit C-!, it starts the python interpreter in
test1dellboy3> another window. Next, I execute -

...

That's not really intended to be used as an interactive session with all
sorts of bells and whistles.

Or he can use ipython, which with the special ipython.el companion file and a
recent (CVS) python-mode, will give him true tab completion (with options
listed in an emacs *completions* buffer) for all objects.

With ipython's %pdb active, it will also open up the source at any uncaught
exception, at the line of the exception. Very handy for debugging.

Regards,

f

ps. All this fanciness is thanks to the sustained efforts of A. Schmolck and P.
Ramachandran, I'm just happy to use them (I can't code a line of elisp).
Back to top
Skip Montanaro
*nix forums Guru


Joined: 28 Feb 2005
Posts: 403

PostPosted: Thu Feb 03, 2005 9:32 pm    Post subject: Re: python-mode tab completion problem Reply with quote

test1dellboy3> I am exploring python-mode on emacs. When I open foo.py
test1dellboy3> in emacs and hit C-!, it starts the python interpreter in
test1dellboy3> another window. Next, I execute -

...

That's not really intended to be used as an interactive session with all
sorts of bells and whistles. If you want a true terminal emulator within
Emacs, try

M-x terminal-emulator RET

You can do tab completion and command recall just like a normal terminal.
(In fact, you can run Emacs within Emacs using terminal-emulator.)

Skip
Back to top
test1dellboy3@yahoo.co.uk
*nix forums beginner


Joined: 03 Feb 2005
Posts: 2

PostPosted: Thu Feb 03, 2005 8:59 pm    Post subject: python-mode tab completion problem Reply with quote

Hi,

I am exploring python-mode on emacs. When I open foo.py in emacs and
hit C-!, it starts the python interpreter in another window. Next, I
execute -

import rlcompleter, readline
readline.parse_and_bind('tab: complete')

Now I will test the completion by trying to complete sys.v (which could
be sys.version or sys.version_info). It works find when I run the
python interpreter from a terminal, by in python-mode, I get -

import sys
sys.v [tab][enter]
'2.3.4 (#2, Jan 5 2005, 08:24:51) \n[GCC 3.3.5 (Debian 1:3.3.5-5)]'

sys.v [tab][tab][enter]
'2.3.4 (#2, Jan 5 2005, 08:24:51) \n[GCC 3.3.5 (Debian 1:3.3.5-5)]'

sys.v [tab][tab][[tab][enter]

sys.version sys.version_info
'2.3.4 (#2, Jan 5 2005, 08:24:51) \n[GCC 3.3.5 (Debian 1:3.3.5-5)]'

I see that it is doing the completion, but it doesn't show me the
choices before I hit enter, instead it moves the cursor one tab stop to
the right. Any ideas?

Thanks in advance
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 10:38 pm | All times are GMT
navigation Forum index » Programming » python
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Unknown in header problem -SOLVED- Light Speed Postfix 0 Thu Jul 03, 2008 10:40 am
No new posts problem with sending mail nuxia Postfix 0 Mon Apr 21, 2008 3:58 am
No new posts Postfix 2.3.8 Virtual problem Blotto Postfix 0 Fri Apr 04, 2008 6:11 am
No new posts Postfix sending problem for local domain remote email monkey_magix Postfix 0 Mon Sep 10, 2007 10:17 am
No new posts bounce problem murkis Postfix 0 Sun Oct 08, 2006 3:45 pm

Novela histórica | eBay | Free Advertising | Payday Advance | Loans
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.3288s ][ Queries: 20 (0.2580s) ][ GZIP on - Debug on ]