How to write pbm file in Python 3?

bradenf at hotmail.com bradenf at hotmail.com
Sun Oct 31 04:45:59 CET 2010


Sorry for the newb question but, what would this be for?

Just out of curiousuty 
Thanks 

------Original Message------
From: André
Sender: python-list-bounces+bradenf=hotmail.com at python.org
To: Python List
Subject: How to write pbm file in Python 3?
Sent: Oct 30, 2010 11:32 PM

I'm trying to create pbm (portable bitmap) files using Python 3 and
have run into a problem.   The example I am using is the Python 2
Mandelbrot program found at
http://shootout.alioth.debian.org/u32/program.php?test=mandelbrot&lang=python&id=1

When I run it using Python 2 with size=100, I get a file of size 1311
bytes.  This file contains the correct image.

When I run it using Python 3 with the same parameter (and replacing
xrange by range - the only change suggested by 2to3), I get a file of
size 1812 bytes; this file does not contain the right image.

Any help would be much appreciated.

André

-- 
http://mail.python.org/mailman/listinfo/python-list



Sent wirelessly from my BlackBerry.


More information about the Python-list mailing list