provato ma: cat my.jar array([80, 75, 3, 4, 20, 0, 8, 0, 8, 0, -111, 121, 65, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, ...., 0, 0, 0], byte)
sto provando in altri modi ... grazie ferp -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Francesco Guerrieri Sent: lunedì, 1. ottobre 2007 15:08 To: Discussioni generali sul linguaggio Python Subject: Re: [Python] Come scrivere un array di bytes in un file binario On 10/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Ma ricevevo il seguente errore: > > [java] Problem invoking WLST - Traceback (innermost last): > [java] File "/products/.../export.py", line 107, in ? > [java] File "/products/.../export.py", line 79, in export > [java] File "/products/.../utils.py", line 59, in writeBinaryFile > [java] TypeError: write(): 1st arg can't be coerced to String > > dove la riga 59 in utils.py è proprio la: > > file.write(bytes) ok. La conversione si fa con la funzione str( ), non String (che non esiste, AFAIK). quindi prova output_file.write(str(bytes)) Se non funziona è perché il tuo oggetto non specifica come debba essere effettuata la conversione. In questo caso, dovresti capire qual è il modo corretto di utilizzare quegli oggetti specifici e io mi arrendo perché non ho nessuna esperienza con quest'ambiente :-) ciao francesco _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python IMPORTANT: This e-mail transmission is intended for the named addressee(s)only. Its contents are private, confidential and protected from disclosure and should not be read, copied or disclosed by any other person. If you are not the intended recipient, we kindly ask you to notify the sender immediately by telephone (+41 (0)58 806 50 00), to redirect the message to the account "[EMAIL PROTECTED]" and to delete this e-mail. E-mail transmissions may be intercepted, altered or read by unauthorized persons and may contain viruses. Therefore, it is recommended that you use regular mail or courier services for any information intended to be confidential. However, by sending us messages through e-mail, you authorize and instruct us to correspond by e-mail in the relevant matter. Thank you. _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python