futue feature division not found (embedded)
Robert Brewer
fumanchu at amor.org
Sat Nov 27 23:23:09 EST 2004
Jive wrote:
> "Bengt Richter" <bokr at oz.net> wrote in message
> news:41a925d5.1197560430 at news.oz.net...
> > On Sat, 27 Nov 2004 22:51:24 GMT, "Jive"
> <someone at microsoft.com> wrote:
> >
> > >I've got a program with Python 2.3 embedded. When I try
> to run a script
> > >containing "from __future__ import division", I get an exception:
> > >
> > > File "main2.py", line 3
> > > from __future__ import divison
> > >SyntaxError: future feature divison is not defined
> > ^^ s/divison/division/ ;-)
> > >
> > >Anyone know how to fix that? BTW, when I run the program with
> > >CO_FUTURE_DIVISION set in PyCompilerFlags, division works
> the new way, as
> it
> > ^^^
> > >should.
> > >
> > >
> > HTH. On to the next bug ;-)
>
> What's HTH?
"Hope that helps"
> It does fail though. Here's the message when I type it right:
>
> File "main2.py", line 3, in ?
> from __future__ import division
> ImportError: No module named __future__
>
> I didn't misspell __future__ did I?
Nope. Mine's sitting at C:\Python23\Lib\__future__.py. Must not have
embedded that one.
Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org
More information about the Python-list
mailing list