futue feature division not found (embedded)

J

Jive

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

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.
 
B

Bengt Richter

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
^^^
HTH. On to the next bug ;-)

Regards,
Bengt Richter
 
J

Jive

The proper expression is, "On to the *last* bug." :)

I worked around it. I'm building an argv by hand and using Py_main. That's
probably a better way to crank it up anyhow.

Jive
 
J

Jive

Oh I see now. I misspelled. But I think it failed when I spelled it right
too. Either that or I misspelled it every time I tried it. Oh well. Since
there are no programs written for my application yet, I've decided just to
make future division the default. Sorry for the bother.

J.
 
J

Jive

Bengt Richter said:
it
HTH. On to the next bug ;-)

What's HTH?

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top