Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

Can I run a python program from within emacs?

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


needin4mation at gmail

Mar 20, 2008, 8:09 AM

Post #1 of 21 (512 views)
Permalink
Can I run a python program from within emacs?

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? Thank you.
--
http://mail.python.org/mailman/listinfo/python-list


grante at visi

Mar 20, 2008, 8:21 AM

Post #2 of 21 (491 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

On 2008-03-20, jmDesktop <needin4mation [at] gmail> 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?

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

--
Grant

--
http://mail.python.org/mailman/listinfo/python-list


jeff at schwabcenter

Mar 20, 2008, 8:28 AM

Post #3 of 21 (491 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

Grant Edwards wrote:
> On 2008-03-20, jmDesktop <needin4mation [at] gmail> 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?
>
> http://www.google.com/search?q=emacs+python

Or achieve a similar (more flexible (IMO), but less smoothly integrated)
effect with Vim and GNU Screen. Until recently, you had to patch Screen
if you wanted vertical splits, but now it's in the main line.
--
http://mail.python.org/mailman/listinfo/python-list


needin4mation at gmail

Mar 20, 2008, 8:30 AM

Post #4 of 21 (490 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

On Mar 20, 11:21 am, Grant Edwards <gra...@visi.com> wrote:
> On 2008-03-20, jmDesktop <needin4mat...@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?
>
> http://www.google.com/search?q=emacs+python
>
> --
> Grant

Gee. Thanks.
--
http://mail.python.org/mailman/listinfo/python-list


michael.wieher at gmail

Mar 20, 2008, 8:43 AM

Post #5 of 21 (491 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

Well, I suppose you could. But why bother with learing emacs when you'll
have to switch to vim later anyway?

2008/3/20, jmDesktop <needin4mation [at] gmail>:
>
> 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? Thank you.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>


jeff at schwabcenter

Mar 20, 2008, 8:44 AM

Post #6 of 21 (493 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

jmDesktop wrote:
> On Mar 20, 11:21 am, Grant Edwards <gra...@visi.com> wrote:
>> On 2008-03-20, jmDesktop <needin4mat...@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?")
--
http://mail.python.org/mailman/listinfo/python-list


pmc411-usenet at yahoo

Mar 20, 2008, 8:51 AM

Post #7 of 21 (491 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

Jeff Schwab wrote:
> jmDesktop wrote:
>> On Mar 20, 11:21 am, Grant Edwards <gra...@visi.com> wrote:
>>> On 2008-03-20, jmDesktop <needin4mat...@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).

Modern editors like GNU Emacs show you a Python tab when you're editing
a Python file that allows you to do various things with the code, just
like Visual Studio, I don't know about "Aquamacs".

> 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?")

There are several flavors, it's best to specify which one you mean.
People who say Emacs often mean GNU Emacs.

Paulo
--
http://mail.python.org/mailman/listinfo/python-list


needin4mation at gmail

Mar 20, 2008, 8:57 AM

Post #8 of 21 (490 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

On Mar 20, 11:44 am, Jeff Schwab <j...@schwabcenter.com> wrote:
> jmDesktop wrote:
> > On Mar 20, 11:21 am, Grant Edwards <gra...@visi.com> wrote:
> >> On 2008-03-20, jmDesktop <needin4mat...@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.
--
http://mail.python.org/mailman/listinfo/python-list


grante at visi

Mar 20, 2008, 8:59 AM

Post #9 of 21 (489 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

On 2008-03-20, jmDesktop <needin4mation [at] gmail> wrote:
> On Mar 20, 11:21 am, Grant Edwards <gra...@visi.com> wrote:
>> On 2008-03-20, jmDesktop <needin4mat...@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?
>>
>> http://www.google.com/search?q=emacs+python
>
> Gee. Thanks.

Golly. You're welcome. Don't the hits on the first page
answer your question? They explain how to do things like run
python programs from within emacs (including how to do
source-level debugging).

This is probably one of the better pages that the google search
above found:

http://wiki.python.org/moin/EmacsEditor

--
Grant
--
http://mail.python.org/mailman/listinfo/python-list


grante at visi

Mar 20, 2008, 9:00 AM

Post #10 of 21 (491 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

On 2008-03-20, Jeff Schwab <jeff [at] schwabcenter> wrote:

>>> 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?")

Don't the normal "run/debug python from inside emacs" methods
work on OS-X?

--
Grant

--
http://mail.python.org/mailman/listinfo/python-list


grante at visi

Mar 20, 2008, 9:10 AM

Post #11 of 21 (491 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

On 2008-03-20, jmDesktop <needin4mation [at] gmail> wrote:

>> 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,

Could not get what to work?

> which is why I posted. If I took it wrong I apologize.

I honestly thought you were asking how to run/debug python
programs inside emacs. A couple of the hits answered that
question. The others explained how do get python-aware editing
modes configured.

> 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.

Perhaps you'd be more comfortable with one of the IDEs?

http://wiki.python.org/moin/IntegratedDevelopmentEnvironments
http://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments#Python

> If that's the wrong expectation for python programming in
> emacs, then I wanted to know.

Yes, you can run programs (including python debuggers) from
inside emacs. The simplest way is to do "meta-x shell" to get
a shell prompt inside emacs, then just type whatever command
line you want to use to run the program. Or you can map a
command to a keystroke that will run the program.

I generally just have another terminal window open where I run
the program -- but I've never liked IDEs so your tastes may
differ.

--
Grant
--
http://mail.python.org/mailman/listinfo/python-list


deets at nospam

Mar 20, 2008, 9:32 AM

Post #12 of 21 (491 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

Grant Edwards wrote:

> On 2008-03-20, Jeff Schwab <jeff [at] schwabcenter> wrote:
>
>>>> 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?")
>
> Don't the normal "run/debug python from inside emacs" methods
> work on OS-X?

Of course they do.

Diez
--
http://mail.python.org/mailman/listinfo/python-list


jeff at schwabcenter

Mar 20, 2008, 9:59 AM

Post #13 of 21 (492 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

Paulo da Costa wrote:

> People who say Emacs often mean GNU Emacs.

That's funny; to me, Emacs usually means XEmacs. :)
--
http://mail.python.org/mailman/listinfo/python-list


jeff at schwabcenter

Mar 20, 2008, 9:59 AM

Post #14 of 21 (491 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

Grant Edwards wrote:
> On 2008-03-20, Jeff Schwab <jeff [at] schwabcenter> wrote:
>
>>>> 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?")
>
> Don't the normal "run/debug python from inside emacs" methods
> work on OS-X?

AFAIK, yes; I don't see why it wouldn't. I missed the word "emacs" in
the subject header, and did not recognize "an emac" in the original post
as meaning "emacs."
--
http://mail.python.org/mailman/listinfo/python-list


pmc411-usenet at yahoo

Mar 20, 2008, 11:07 AM

Post #15 of 21 (490 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

Jeff Schwab wrote:
> Paulo da Costa wrote:
>
>> People who say Emacs often mean GNU Emacs.
>
> That's funny; to me, Emacs usually means XEmacs. :)

Which is often a cause of confusion.

Paulo
--
http://mail.python.org/mailman/listinfo/python-list


david.reitter at gmail

Mar 22, 2008, 1:47 AM

Post #16 of 21 (490 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

On Mar 20, 3:09 pm, jmDesktop <needin4mat...@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? Thank you.

Aquamacs, just like any variant of GNU Emacs, will show a Python
menu. There's a "Start Interpreter" function, and one to evaluate the
buffer (C-c C-c). It's pretty straightforward (a euphemism for
obvious).

If the Python menu doesn't show, then something is going wrong. M-x
python-mode RET would switch it on.


--
http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and
support the Aquamacs Project!
--
http://mail.python.org/mailman/listinfo/python-list


castironpi at gmail

Mar 22, 2008, 3:50 AM

Post #17 of 21 (488 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

On Mar 22, 3:47 am, David Reitter <david.reit...@gmail.com> wrote:
> On Mar 20, 3:09 pm, jmDesktop <needin4mat...@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?  Thank you.
>
> Aquamacs, just like any variant of GNU Emacs, will show a Python
> menu.  There's a "Start Interpreter" function, and one to evaluate the
> buffer (C-c C-c).  It's pretty straightforward (a euphemism for
> obvious).

Aside:

Straightforward may not be completely objective, i.e. have a metric/
unique metric. If perception & cognition are points on and paths
through a multi-dimensional space (densities in which limited by sense
mechanism), straightforward under its most literal interpretation,
means, 'in a straight line in the direction you're facing'. Straight
could mean an elementary, transcendantal, or composite function (say,
a sum of three sine waves). But forward leaves less to imagine. If
two ships cross, and one captain says, 'Bermuda? Sure. It's straight
forward,' to the other, he travels for a day and doesn't get there,
and he's angry, does he feel and/or believe that the first captain
provoked him, did he, and does he know it.

Straightforward doesn't necessarily evaluate to a concrete move
sequence in chess ('The pin is straightforward'); forward is ambiguous
(my forward, your forward, the formal forward), and straight is too.
In a depth-first search (unspecified), straight means move the same
piece repeatedly. In breadth-first, straight means you know exactly
my node weights. Forward means I know which direction you're facing,
or I'm following you. Both are resent-worthy assumptions: If you lose
me or I lose you, it's still your fault.

I take that back: either party can slack on following protocol; both
are following one. There's a ball, who dropped it (and who's on it!).

"Obvious", come to think of it, is pretty subjective too. The objects
and their respective distances away in one's perceptive(/cognitive)
environment vary from person to person, time to time ("by person by
time"). If you're telling me something is obvious, one of us made an
out-of-band inference.

I'm not sure what to think of the prevalence of human
miscommunications. Upon discovering one, either cut and go, or go
back for it; it's a sunken cost. (Is it a, 'I forgot to bring
something' on an embarked voyage (road trip), in the metaphor of ship
travel?) Do those both generate fights? There's social profit in
commerce-- but people are making some damn foolish partnerships.
(Even exclusivity can be profitable, but for some reason, 'exclusivity
agreement' isn't in Wikipedia, under exclusivity, marketing, marketing
strategy, or consumer engagement. 'Product bundling' is a good place
to start though-- lower marginal cost -and- higher marginal utility.
('Bundling' is also a social practice in the Netherlands!) Also see
law of excluded middle.)

Back to the exam: If A knows B's 'straight' and 'forward', maybe it
can be helpful, merely advising, 'don't take any turns and you won't
miss it (undershoot or overshoot)', which does take knowledge of
steering, just not of the terrain. It's just that if I don't know how
to stay on course, (not to turn), I'll still resent you. Not to
mention, a 'great circle straight' isn't the same as a Euclidian one.

It's possible, though, in the economy of social transaction, that "I"
don't "have time" to "take you there", all of those being defined
earlier: one of the parties can't afford to board, possibly return,
tow, or tie you, or it isn't profitable. It's possible your ship
can't take the tow too.

Notwithstanding, in the domain of collective social entities (many-
small/organisms), other senses of channel symbols / band symbols can
arise. "That doesn't mean the same thing back home / back in the
channel." I don't like learning the hard way-- by definition. But
the solution to the 'rich bully dilemma' is pretty much boycott-- cf.
Nash and optimal equilibrium. (That's optimal, not optical.) In
light of some certain "mental health" observations too, if boycotts
fail, protest is plan B.

Mere incompetence on either part is pretty easy to fix. It's the
'incompetent rich bully' who interferes with everybody else.

Nothing personal to the poster-- he covered his socal bases-- just
being thorough.

Last thing-- does "maintain forever" mean deal with us? Hush. A
pretty small group could build/anchor an outland base and maintain
people there forever, just with ferry trips back in. Past a certain
radius too (from hubs), bases become polynomially sparser-- just move
in with the monkey on your back, and we'll all get orbits around the
sun.
--
http://mail.python.org/mailman/listinfo/python-list


fred.sells at adventistcare

Mar 25, 2008, 8:19 PM

Post #18 of 21 (486 views)
Permalink
RE: Can I run a python program from within emacs? [In reply to]

I use a .emacs file (attached) that some associates gave me nearly 20 years ago. Some of it is OBE now, but it still works for me on both windows and Linux. With this file I can cntrl-c cntrl-c (i.e. ^c twice to run the current buffer). Don't ask me to explain it, it just works.

> -----Original Message-----
> From: python-list-bounces+frsells=adventistcare.org [at] python
> [mailto:python-list-bounces+frsells=adventistcare.org [at] python]On
> Behalf Of Jeff Schwab
> Sent: Thursday, March 20, 2008 11:29 AM
> To: python-list [at] python
> Subject: Re: Can I run a python program from within emacs?
>
>
> Grant Edwards wrote:
> > On 2008-03-20, jmDesktop <needin4mation [at] gmail> 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?
> >
> > http://www.google.com/search?q=emacs+python
>
> Or achieve a similar (more flexible (IMO), but less smoothly
> integrated)
> effect with Vim and GNU Screen. Until recently, you had to
> patch Screen
> if you wanted vertical splits, but now it's in the main line.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Attachments: .emacs (3.55 KB)


rustompmody at gmail

Nov 1, 2009, 9:15 AM

Post #19 of 21 (426 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

On Nov 1, 7:20 pm, Robinson <WanderingAen...@comcast.net> wrote:
> I have also just started with both Aquamacs and Python so I ask for  
> your patience as well.
> When I evaluate the buffer (C-c C-C) I don't see any response or  
> output from my python program. Should another buffer open  
> automatically? Should a terminal window open?
> thanks for your patience.
> Rugbeia Floreat Ubique
>
> > On Mar 20, 3:09 pm, 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?

There are two python modes -- python.el and python-mode.el
Default with emacs is python.el, what comes from/with python is python-
mode.el (needs a download and a couple of lines of setup see
http://www.emacswiki.org/emacs/PythonMode). I recommend python-mode.

The key-bindings are different --C-c ! to start interpreter followed
by C-c C-c to exec a file.


--
http://mail.python.org/mailman/listinfo/python-list


WanderingAengus at comcast

Nov 1, 2009, 9:16 AM

Post #20 of 21 (426 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

Jason,
Thanks, but I have already tried your suggestions (which seem like
logical cause/effect actions) and nothing. There must be a python
preference or something I haven't set correctly.

There is no Aquamacs list, but I'll check further.

Thanks again for the quick reply.


On Nov 1, 2009, at 9:15 AM, Jason Sewall wrote:

> On Sun, Nov 1, 2009 at 9:20 AM, Robinson
> <WanderingAengus [at] comcast> wrote:
>> I have also just started with both Aquamacs and Python so I ask for
>> your
>> patience as well.
>> When I evaluate the buffer (C-c C-C) I don't see any response or
>> output from
>> my python program. Should another buffer open automatically? Should a
>> terminal window open?
>
> I don't know much about Aquamacs or the version of Emacs the Aquamacs
> you are using is based on, but the C-c C-c command runs
> py-execute-buffer. Try M-x py-execute-buffer <RET> and see what
> happens. It should pop up a *Python Output* buffer, unless you're
> actually running the python interpreter in Emacs, in which case the
> code is run in that buffer.
>
> If you're still having trouble, probably an Emacs or Aquamacs list is
> a better place to look.
>
> Jason

--
http://mail.python.org/mailman/listinfo/python-list


WanderingAengus at comcast

Nov 3, 2009, 1:58 PM

Post #21 of 21 (386 views)
Permalink
Re: Can I run a python program from within emacs? [In reply to]

On Nov 1, 10:15 am, rustom <rustompm...@gmail.com> wrote:
> On Nov 1, 7:20 pm, Robinson <WanderingAen...@comcast.net> wrote:
>
> > I have also just started with both Aquamacs and Python so I ask for  
> > your patience as well.
> > When I evaluate the buffer (C-c C-C) I don't see any response or  
> > output from my python program. Should another buffer open  
> > automatically? Should a terminal window open?
> > thanks for your patience.
> > Rugbeia Floreat Ubique
>
> > > On Mar 20, 3:09 pm, jmDesktop <needin4mat... at gmail.com> wrote:
> > > > Hi, I'm trying to learn Python.  I usingAquamacan 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?
>
> There are two python modes -- python.el and python-mode.el
> Default with emacs is python.el, what comes from/with python is python-
> mode.el (needs a download and a couple of lines of setup seehttp://www.emacswiki.org/emacs/PythonMode). I recommend python-mode.
>
> The key-bindings are different --C-c ! to start interpreter followed
> by C-c C-c to exec a file.

Perfect! Many thanks...
--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.