soluzione trovata:
file = open(fileName, 'wb')
for entry in bytes:
file.write(struct.pack('b', entry))
file.close()
e verifica del file prodotto:
jar tvf /products/.../DummyEvent-sbconfig.jar
23728 Mon Oct 01 15:49:26 CEST 2007 ExportInfo
264 Mon Oct 01 15:49:26 CEST 200
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
Gu
Ciao Francesco,
ti ringrazio per il suggerimento, provvedo a cambiarlo.
Il codice inizialmente era il seguente:
bytes =
ALSBConfigurationMBean.exportProjects(Collections.singleton(projectRef), None)
file = open(fileName, 'wb')
file.write(bytes)
file.close()
dove il metodo exportProjects ritor
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