[Pythonmac-SIG] The edit/test cycle

Just van Rossum just@letterror.com
Wed, 5 Apr 2000 00:19:36 +0100


At 5:30 PM -0400 04-04-2000, Louis M. Pecora wrote:
>I'm trying to get started on the "edit/test" cycle of developing python
>modules.  One thing that immediately stumped me on my Mac is that I can
>define a path, put a file there (module with functions), and import it.
>But when I alter something in the file it does not show up in the
>interpreter (IDE).  If I try to import again, nothing changes.  Only
>quitting the IDE, launching it, again, and importing the module again gets
>the changes in place.  How does one do the development when constant
>changes are necessary and need to be tested?  Thanks for any help.

In the IDE, just open your module source, and click "Run all". Tip: you can
also run portions of code, even individual methods(*). You might get wrong
line numbers in your tracebacks, but it's very handy nevertheless.

*) This inserts an updated version of the method(s) into the *existing*
class, making changes effective even for live objects!

Just