Can I run a python program from within emacs?

jmDesktop needin4mation at gmail.com
Thu Mar 20 11:57:38 EDT 2008


On Mar 20, 11:44 am, Jeff Schwab <j... at schwabcenter.com> wrote:
> 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?")

No.  Typically when someone posts a one-liner search it means go
figure it out and stop bothering "us."  I had already searched.  I
could not get it to work, which is why I posted.  If I took it wrong I
apologize.

I really had two questions.  One is just how to run a program from
within the editor and the other is if my thinking on how development
is done in python wrong to start with.  Most of my non-Windows
programs have been on Unix using vi, but it has been a while.  I'm
used to writing a program in visual studio and running it.  If that's
the wrong expectation for python programming in emacs, then I wanted
to know.

Thanks for your help.



More information about the Python-list mailing list