How do you develop in Python?

Louis M. Pecora pecora at
Wed Jun 6 08:16:40 EDT 2001

In article <m3itiapw69.fsf at>, Michael Hudson
<mwh at> wrote:

> Lou Pecora <pecora at> writes:
> > I program in Python occassionally and would like to do more of it.  But
> > here's a development conundrum I run into a lot (there are more complex
> > examples, but I'll give an easy one).  I am developing module
> > which imports in the IDE.  I am running test code which is also in
> > as I incrementally develop  Then I need to change and,
> > of course, the import does not import the new changes since import only
> > works once.  Hence,  to "refresh" I have to quit the IDE and
> > restart, open and run.  This is clumsy.  However, the above
> > scenario is not uncommon and more complex interdependencies of modules
> > appear to make it unavoidable.  Anyone know a way to get around this
> > "import" problem?   I know there is a "reload", but then I have to
> > import and change my modules' code to "reload" or something each time I
> > work with them.  Any help appreciated.
> If module goes
> import B
> ... uses B ...
> and then in the top-level you type
>     >>> import A
>     >>> import B
> then change
> then in the top-level typing
>     >>> reload(B)

Let me try to rephrase your solution. I go into the "commandline"
window and do a reload of the imported modules.  I guess that would
work.  I will try it.  I was looking for a more automatic way of
reloading things as they changed rather than having to manually do it
when I altered code in another module.  Thanks.

More information about the Python-list mailing list