Can I run a python program from within emacs?

castironpi at gmail.com castironpi at gmail.com
Sat Mar 22 06:50:09 EDT 2008


On Mar 22, 3:47 am, David Reitter <david.reit... at gmail.com> wrote:
> 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?
> > 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.



More information about the Python-list mailing list