all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon <bbbscarter@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Python workflow
Date: Fri, 6 Nov 2009 03:42:44 -0800 (PST)	[thread overview]
Message-ID: <fd7f4eab-e583-4389-b5b3-bf6b86e6ce59@p35g2000yqh.googlegroups.com> (raw)

Hi, apologies in advance for a potentially numpty post.

I've been using Emacs for a little while now, but I've yet to settle
on a satisfactory python edit-run-debug cycle, and I was wondering
what wiser minds than mine have settled upon. So far I've tried:

* Edit code and run with emacs PDB. After fiddling the lisp code to
automatically pick up the current buffer as the default run candidate,
this is nearly okay. The main issue is that, after editing code,
there's no easy way to rerun the code, so I end up killing the gud
buffer every time. As such, entering and leaving the debugger is quite
a few key presses and accidentally leaving it running is also easy.

* Tried Pydb to similar effect.

* Run everything in a seperate shell. And debug by hand. This is a
little too low-fi, even for me.

* Use the 'import/reload file' and 'eval def/class' functions, and run
everything from the emacs python shell, using pdbtrack to help with
debugging. Problems so far:
*** It's very easy to forget which modules you've modified and fail to
reload them; because the state is carried over I continually find
myself running the old versions of code I've just edited, especially
if it's across several files.
*** More than that, sometimes the stuff I expect to reload simply
doesn't, and I have no indication as to why. For example, if pdb has
module open and you stick a deliberate error in the code and reload
it, the minibuffer tells you the module has been loaded, even though
it clearly can't have been.
*** I have to run pdb.pm() to debug the exception. If I run *anything*
else by accident, I lose the exception context. This can be annoying
if you're incompetent enough to keep making typos (I am).

Does anyone have any tips on their workflow?

Many thanks!

Simon


                 reply	other threads:[~2009-11-06 11:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=fd7f4eab-e583-4389-b5b3-bf6b86e6ce59@p35g2000yqh.googlegroups.com \
    --to=bbbscarter@gmail.com \
    --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.