On 10/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> soluzione trovata:
>
> file = open(fileName, 'wb')
> for entry in bytes:
> file.write(struct.pack('b', entry))
> file.close()
>
ottimo :-)
Cerca di cambiare il nome 'file' in qualcosa tipo my_file, altrimenti
oscuri il
/resource/DummyEvent-Consumer1-ConsumerEventTransf.Xquery
...
ciao
ferp
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Francesco
Guerrieri
Sent: lunedì, 1. ottobre 2007 15:31
To: Discussioni generali sul linguaggio Python
Subject: Re: [Python] Come scrive
On 10/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 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)
Questo vuol dire che str(bytes) ha quella rappresentazione. Cosa ti
aspettavi inve
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] Proble
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
> [ja
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Francesco
Guerrieri
Sent: lunedì, 1. ottobre 2007 14:44
To: Discussioni generali sul linguaggio Python
Subject: Re: [Python] Come scrivere un array di bytes in un file binario
On 10/1/07, [EMAIL PROTEC
On 10/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Ciao a tutti,
>
> non uso direttamente python ma lo uso indirettamente da WLST (weblogic
> scripting tool).
>
> Ho un array di bytes da scrivere in un file binario, il codice è il
> seguente:
>
> fileName = 'my.jar'
> bytes = ...
> file
Ciao a tutti,
non uso direttamente python ma lo uso indirettamente da WLST (weblogic
scripting tool).
Ho un array di bytes da scrivere in un file binario, il codice è il seguente:
fileName = 'my.jar'
bytes = ...
file = open(fileName, 'wb')
file.write(String(bytes))
file.close()
ma se facci