Can I run a python program from within emacs?

Jeff Schwab jeff at schwabcenter.com
Thu Mar 20 11:44:07 EDT 2008


jmDesktop wrote:
> On Mar 20, 11:21 am, Grant Edwards <gra... at visi.com> wrote:
>> On 2008-03-20, jmDesktop <needin4mat... at gmail.com> wrote:
>>
>>> Hi, I'm trying to learn Python.  I using Aquamac an emac
>>> implementation with mac os x.  I have a program.  If I go to the
>>> command prompt and type pythong myprog.py, it works.  Can the program
>>> be run from within the editor or is that not how development is done?
>>> I ask because I was using Visual Studio with C# and, if you're
>>> familiar, you just hit run and it works.  On Python do I use the
>>> editor for editing only and then run the program from the command
>>> line?

Sort of.  Modern editors generally have support for building and running 
your program directly from a toolbar button or textual command.  I 
personally use Vim with the toolbar disabled, running in a Terminal, and 
run the program by first putting Vim in the background (^z).

People writing code specific to Mac, but not necessarily all in Python, 
often use XCode.

     http://zovirl.com/2006/07/13/xcode-python/

In the Ruby community, Vim is the dominant choice, but a lot of Mac 
users swear by TextMate.

     http://macromates.com/

>> http://www.google.com/search?q=emacs+python

> Gee.  Thanks.

I believe Grant was suggesting that Emacs often serves a similar purpose 
on Unix to what Visual Studio does on Windows, which seemed to be what 
you were asking.  When asking about Mac OS X here, you are likely to get 
a lot of generic Unix responses.  (Would it have been clearer if he had 
just said "emacs?")



More information about the Python-list mailing list