[Tutor] question about a number and bytes.

shawn bright nephish at gmail.com
Tue Jan 29 22:13:16 CET 2008

Thanks for your reply.
i need to do this in python because python is what scripting language
our data I/O system is written in.
i am writing a command out over a serial port that tells an RTU to
change part of it's program. I am not sure what you mean by using it
in any other python context, this is about the only thing we will need
to be able to do this for, at least, that is the case for right now.

On Jan 29, 2008 2:55 PM, Tiger12506 <keridee at jayco.net> wrote:
> > Hello there all.
> >
> > I have a need to make a hi byte and lo byte out of a number.
> >
> > so, lets say i have a number 300, and need this number to be
> > represented in two bytes, how do i go about that?
> First question. Why would you need to do this in python? Second question. If
> you could do that, how would you use it in any other python context?
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

More information about the Tutor mailing list