PythonWin IDE sucks!

Prateep Siamwalla teep at inet.co.th
Fri Oct 27 23:15:58 EDT 2000


Dale,

Since I didn't catch the beginning of this thread, I'm assuming you are
talking about how after a reload(module), and you run your tests on the
interactive window, Python still manages to catch your old code errors.
Even after editting the offending code and reloading.

I've been there before, and as a novice, all I can offer you is this:
1. After making changes/correction on the offending module, click the "run"
while that module's window is active.
2. Then go back into the interactive module and do the reload.
3. Try your tests again.

this seems to work for me.

<novice speculation>
I think what happens is that the offending bits of your code are still stuck
inside .pyc files which, is the one that is reloaded from your interactive
prompt.  By clicking "run" on your module, you forcefully overwrite the
module's pyc file with your new code, so that the next reload is of the
newly editted code.
</novice speculation>

Hope this helps,
teep


Dale Strickland-Clark <dale at out-think.NOSPAMco.uk> wrote in message
news:rucjvskc6hsqiojpdivjrorrrl2sf94f49 at 4ax.com...
> Alan Gauld <alan.gauld at gssec.bt.co.uk> wrote:
>
> >Dale Strickland-Clark wrote:
> >> This is such a huge irritation and time waster for me that if it isn't
> >> sorted out I can't really consider Python for future large projects.
> >
> >What has the Pythonwin IDE got to do with using Python?
> >
> >> To test a module, I import it into PythonWin using the Import/Reload
> >> button and then instantiate a class in the Interactive Window.
> >
> >How are you importing?
>
> Using the Import/Reload button on the toolbar, which is the same as
> File -> Import or CTRL-I
>
> > You did notice that reload only
> >works if you use:
> >
> >import foo
> >
> >Whereas
> >
> >from foo import *
> >
> >will make reload ineffective.
> >That's a python limitation not a pythonwin fault.
> >
> >> After a failure, I fix the offending code and Import/Reload again.
> >> However, the same failure occurs showing the original line with it's
> >> original contents. The changed module hasn't been loaded.
> >
> >Did you delete the class instance and create a new one after
> >the reload? The original is still running the original
> >code... (I think!)
>
> In this particular case, no class was instantiated owing to a bug in
> the code.
>
> >
> >> The only way to fix it is to quite and reload PythonWin
> >> but then you have to arrange windows, reestablish
> >> breakpoints and watches, etc. and it all takes far too long.
> >
> >Too long compared to what? We have a 4 hour compile cycle
> >on one of our current C++ projects.... by comparison
> >working with python is a joy! :-)
>
> Compared to not. This is the ONLY IDE I've used that can't handle
> buggy code. (I've used, VB, Visual Studio, Delphi to name a few.)
>
> >
> >What other environment do you use that allows you to
> >load new module files into a running process?
>
> See list above.
>
> >
> >
> >BTW Have you tried IDLE?
>
> Only briefly. Is it likely to improve matters? I'll see if I can work
> with it.
>
> >What happens if you use the command line interpreter?
>
> I do for most trial runs owing to problems described but sometimes I
> want to have an interactive nose around. It's also useful to have a
> preserved program state after an error.
>
> >And what version of Pythonwin? There was a buggy version
> >about a year back. (was it winall version 125?)
>
> 133
>
> >
> >Alan G.
>
> --
> Dale Strickland-Clark
> Out-Think Ltd
> Business Technology Consultants
>
>





More information about the Python-list mailing list