strings in Python (newbie)

zif zf_acs at DELETETHIShotmail.com
Thu Mar 13 17:09:52 EST 2003


Thanks, I'll try that as well. Another question: how
can I break long text/array elements across multiple
lines?

Thanks,
zif

Richard Brodie <R.Brodie at rl.ac.uk> wrote in message
news:b4ppb4$lhg at newton.cc.rl.ac.uk...
>
> "zif" <zf_acs at DELETETHIShotmail.com> wrote in message
> news:TRPba.5637$VT.631305 at news20.bellglobal.com...
>
> > Thanks for the replies. I've just started to learn Python,
> > and my first exercise would be to rewrite some old
> > command prompt C code wrote for socket communication
> > with GE Electric industrial controllers (PLCs).
>
> Funny that: the only time I can recall using the array
> module is for another PLC application. Using the (more
> general)  struct module to pack heterogenous data packets
> is much more common.
>
> import array
> estab = [8, 0, 1, 0, 0, 0, 0, 0...]
> array.array('B', estab).tostring()
>
> would probably be how I'd code it.
>
>
>






More information about the Python-list mailing list