[Tutor] Division

dman dsh8290@rit.edu
Mon, 3 Dec 2001 13:24:58 -0500

On Mon, Dec 03, 2001 at 01:03:41PM -0500, Tim Peters wrote:
| [Gregor Lingl]
| > Oh! (*flush!* (red))
| >
| > What a mistake!
| > I wanted to say:
| >
| > C:\python22\tools\python -Qnew idle.py
| >                                ^^^^^^^
| > doesn't work
| >
| > (And it doesn't!)

I installed IDLE for you (though I'm on a debian box, not windows) and
traced through how it executes stuff.

| You're right, it doesn't work -- Guido and I are looking into why (it's a
| mystery so far!).
It uses an instance of code.InteractiveInterpreter (built-in stuff)
which uses codeop.CommandCompiler.  The __future__ statement stuff
works, as the comment says it does.

It seems that the bug is somewhere down in the built-in compile()

Anyways, put

        self.interp.runsource( "from __future__ import division" )

on line 353 of PyShell.py for a quick "fix".  It should be the last
statement of the __init__ method.



Q: What is the difference betwee open-source and commercial software?
A: If you have a problem with commercial software you can call a phone
   number and they will tell you it might be solved in a future version.
   For open-source sofware there isn't a phone number to call, but you
   get the solution within a day.