On Wed, Oct 1, 2008 at 1:08 AM, Daniele Varrazzo [EMAIL PROTECTED] wrote:
input = open('foo.img','rb').read().decode('ISO-8859-1')
Direi che non ha senso usare un encoding testuale per codificare
un'immagine.
Sono d'accordo. Più avanti ti spiego perché sono stato costretto ad
utilizzarli.
On Wed, 01 Oct 2008 14:33:23 +0200, [EMAIL PROTECTED] wrote:
Ok, il problema nasce dal fatto che se all'encoder passo una stringa
fatta in questo modo, python si lamenta:
input = open('foo.img','rb').read()
Traceback (most recent call last):
File testing.py, line 32, in module
Ciao,
sto usando uno script Python in congiunzione con JPype, un framework
per usare classi Java in Python. Ho però un problema, forse legato ai
decoding/encoding dei locales.
Passiamo subito al codice:
from jpype import *
import os
import random
import math
import sys
input =