Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
>kettle <[EMAIL PROTECTED]> writes:
>> # pack $length as a 32-bit network-independent long
>> my $len = pack('N', $length);
>[...]
>> the sticking point seems to be the $len variable.
>Use len = struct.pack('!L', length) in Python. See
>http://docs.python.
On Feb 8, 4:01 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> kettle <[EMAIL PROTECTED]> writes:
> > # pack $length as a 32-bit network-independent long
> > my $len = pack('N', $length);
> [...]
> > the sticking point seems to be the $len variable.
>
> Use len = struct.pack('!L', length) in Python.
kettle <[EMAIL PROTECTED]> writes:
> # pack $length as a 32-bit network-independent long
> my $len = pack('N', $length);
[...]
> the sticking point seems to be the $len variable.
Use len = struct.pack('!L', length) in Python. See
http://docs.python.org/lib/module-struct.html for details.
--
htt
On Feb 8, 12:08 am, Bjoern Schliessmann wrote:
> kettle wrote:
> > Hi I have a socket script, written in perl, which I use to send
> > audio data from one server to another. I would like to rewrite
> > this in python so as to replicate exactly the functionality of the
> > perl script, so as to in
On Feb 7, 2008 9:39 AM, kettle <[EMAIL PROTECTED]> wrote:
> f = open('/home/myuname/socket.wav','rb')
> audio = ""
> for line in f:
> audio += line
I don't know anything about socket programming in python, but this bit
doesn't seem right for working on a binary file. You should just read
all
kettle wrote:
> Hi I have a socket script, written in perl, which I use to send
> audio data from one server to another. I would like to rewrite
> this in python so as to replicate exactly the functionality of the
> perl script, so as to incorporate this into a larger python
> program. Unfortunat
Hi I have a socket script, written in perl, which I use to send audio
data from one server to another. I would like to rewrite this in
python so as to replicate exactly the functionality of the perl
script, so as to incorporate this into a larger python program.
Unfortunately I still don't really