Re: script fichiers binaires lecture écriture

2005-06-30 Thread Mike Meyer
bruno modulix <[EMAIL PROTECTED]> writes: >> Be aware that I'm >> using pyhton 1.5, > Err... latest is 2.4.1, and the language has really, really changed. You > should consider upgrading... > >> unfortunately... > > BTW, in 1.5.x, you can use the String module instead of string class > methods:

Re: script fichiers binaires lecture écriture

2005-06-30 Thread bruno modulix
Statesman wrote in comp.lang.python: Hi Statesman comp.lang.python is the english-speaking Python forum. You may want to try the french-speaking one at fr.comp.lang.python (xpost and fu2 set) > Je connais mal python et n'est pas trop le temps de m'y plonger bien > que cela semble être assez pui

Re: script fichiers binaires lecture écriture

2005-06-30 Thread bruno modulix
Statesman wrote: > In English: > > I don't know much about python and I won't have much time to learn much > about it even if it seems powerful... > (snip code) > Here is an error I get trying to run this script: > > AttributeError: 'string' object has no attribute 'index' > > According to me,

Re: script fichiers binaires lecture écriture

2005-06-30 Thread Statesman
In English: I don't know much about python and I won't have much time to learn much about it even if it seems powerful... import sys import ixio import os M = ixio.getMAC("eth0") S = "%08X %08X" % (M[0] | M[1]<<8 | M[2]<<16 | M[3]<<24, M[4] | M[5]<<8) K = "Errorin:" if len(sys.argv) <> 3: pr

script fichiers binaires lecture écriture

2005-06-30 Thread Statesman
Je connais mal python et n'est pas trop le temps de m'y plonger bien que cela semble être assez puissant... import sys import ixio import os M = ixio.getMAC("eth0") S = "%08X %08X" % (M[0] | M[1]<<8 | M[2]<<16 | M[3]<<24, M[4] | M[5]<<8) K = "Errorin:" if len(sys.argv) <> 3: print "Usage %s