473,387 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

futue feature division not found (embedded)

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.
Jul 18 '05 #1
5 2236
On Sat, 27 Nov 2004 22:51:24 GMT, "Jive" <so*****@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 ;-)

Regards,
Bengt Richter
Jul 18 '05 #2

"Bengt Richter" <bo**@oz.net> wrote in message > HTH. On to the next bug ;-)

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
Jul 18 '05 #3
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.
Jul 18 '05 #4

"Bengt Richter" <bo**@oz.net> wrote in message
news:41*****************@news.oz.net...
On Sat, 27 Nov 2004 22:51:24 GMT, "Jive" <so*****@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?

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?
Jul 18 '05 #5
Jive wrote:
"Bengt Richter" <bo**@oz.net> wrote in message
HTH. On to the next bug ;-)


What's HTH?


http://www.google.ca/search?q=acronym+hth

-Peter
Jul 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Stephan Diehl | last post by:
I was playing around with defining new types and have seen the following behaviour: Python 2.3.1 ============ >>> class Int(int):pass .... >>> a = Int(7) >>> b = Int(8)
17
by: Chris Travers | last post by:
Hi all; I just made an interesting discovery. Not sure if it is a good thing or not, and using it certainly breakes first normal form.... Not even sure if it really works. However, as I am...
5
by: silentlights | last post by:
Hi, Is there a possibiliy to improve division or Modulo operations in the following, tmp1 = 123; tmp2 = 123; frame = ((char)((tmp1/100)+48)); // Division tmp1 = (tmp2...
40
by: fordge | last post by:
we usually use <<n as a cheaper option to multiplication when its factor of 2^n right, even for non 2^n say ix24 ==> ix(16+8) ==> (i<<4)+(i<<3) similarly divison 2^n is >>n
8
by: nineteen | last post by:
for example: 16/5: 3 -------- 5)16 15 -------- 1 the user input the dividend and divisor,the program should display the upright formula like the example. and , the program must use recursive...
17
by: seb.haase | last post by:
Hi, Is it true that that "Python 3000" is dead ? Honestly I think that e.g. changing 5/2 to be 2.5 (instead of 2) would just break to much code :-( On the otherhand I'm using Python as "Matlab...
94
by: krypto.wizard | last post by:
Last month I appeared for an interview with EA sports and they asked me this question. How would you divide a number by 7 without using division operator ? I did by doing a subtraction and...
1
by: youjay | last post by:
I've been out of perl for a while, so I am starting from scratch. I have a small applet which scans a set of directories, getting information from some files in each one, and displaying selected...
4
by: oldnewbie | last post by:
EXAMPLE Please load a movie (with the buttons) to see the iframe's content... Given the above example, where I used an iframe (within it's own division...) over an embedded Flash movie, how can I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.