all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Python workflow
@ 2009-11-06 11:42 Simon
  0 siblings, 0 replies; only message in thread
From: Simon @ 2009-11-06 11:42 UTC (permalink / raw
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-06 11:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-06 11:42 Python workflow Simon

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.