all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuri D'Elia <wavexx@thregr.org>
To: help-gnu-emacs@gnu.org
Subject: Evaluating python code blocks in python-mode
Date: Sat, 20 Jun 2015 12:50:39 +0200	[thread overview]
Message-ID: <mm3ghv$ndn$1@ger.gmane.org> (raw)

Hi everyone,

I'd like some advice about using python-mode with a python subprocess.
I always preferred to use emacs+file+external process as opposed to use
an ipython's notebook-like interface: it's just more convenient,
especially when debugging existing code.

I often use the same setup when doing some analysis, and this is when an
inotebook-like interface is more convenient for evaluation: I'd like to
evaluate code not line-by-line, or by defun, but by my custom-defined
blocks. I realized I was continuously selecting a region, and using
py-send-region over and over.

Right now I narrow to the region I'm editing, and use py-send-buffer
instead. It's ok-eish, but narrow/widen narrow/widen, while less common,
is still inconvenient.

I've seen people using org-mode for this kind of setup instead. Which
might be ok, but I'd like to know what other choices I could have as well.

I was thinking of defining a custom region using comments, and defining
my own py-send-custom-block using comment markers as boundaries. Surely,
something like this must already exists.




             reply	other threads:[~2015-06-20 10:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-20 10:50 Yuri D'Elia [this message]
2015-06-20 19:09 ` Evaluating python code blocks in python-mode Andreas Röhler
2015-06-21  6:20   ` Andreas Röhler
2015-06-21 16:17     ` Yuri D'Elia
2015-06-21 16:18     ` Yuri D'Elia
2015-06-21 16:35       ` Yuri D'Elia
2015-06-21 18:52         ` Andreas Röhler
2015-06-25 10:25           ` Yuri D'Elia
2015-06-25 10:25           ` Yuri D'Elia
2015-06-25 11:21             ` Andreas Röhler
2015-06-25 12:33               ` Yuri D'Elia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='mm3ghv$ndn$1@ger.gmane.org' \
    --to=wavexx@thregr.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.