how do "real" python programmers work?

Ben Finney bignose+hates-spam at benfinney.id.au
Thu Jan 12 21:15:50 EST 2006


Scott David Daniels <scott.daniels at acm.org> writes:
> bblais wrote:
>> How do experienced python programmers usually do it?  Is there a
>> "usually" about it, or is it up to personal taste?  Are there any
>> convenient ways of doing these things?
> There are a lot of us who use a test-first process:
>     Write a unit test, watch it fail, fix the code til the test passes.

I'm in this camp, but because I use Emacs I have an IDE:

  - multiple edit buffers for the Python code (any good editor can do
    this)

  - from any Python code buffer, C-c C-c to execute

  - output shown in a new buffer, automatically jump to errors in code

  - separate buffer with a live Python prompt to experiment

  - separate buffer browsing documentation if needed

  - edit buffer for version control commit message

That's all a single Emacs session in one window of GNU screen; in a
separate window is a regular shell session where I can run other
things outside Emacs if I choose.

I'm currently using a version control system that doesn't integrate
with Emacs, so I have another shell buffer for that, plus an Emacs
buffer for the commit message. Ideally, I'd use Emacs native features
for version control too.

Another shell session constantly runs the project's unit tests (with a
'nice' setting so it doesn't get in the way of anything
process-intensive I might do elsewhere). I can quickly check the
pass/fail state of all the tests just by switching to that window.

All of the above could be done using many more screen sessions, but
Emacs buffers are more accessible when you're already editing.

-- 
 \          "Time's fun when you're having flies."  -- Kermit the Frog |
  `\                                                                   |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list