Python GUIs

T

Tuvas

I have a program that I am devoloping, that uses python as a GUI
interface for a camera that we am building. Our camera is controlled
using an 8 byte control squence, depending on the command, will have
several configurations for each byte. I need to be able to have some
way to manage all 8 bytes without interferance with the other. As the
commands we have developed are in hex, that would make life even easier
if I can somehow controll them using hex. The output is in a similar
manner. Any help that you could give me on how to go about doing this
would be greatly appreciated. Thanks!
 
T

Tuvas

As a bit more of an update, I have decided to create a list of strings,
but am having a problem. To illistrate this in a simple manner.

B='\x12','\x32'
B[0]='\x12'

I cannot get this to work, and I need to get it to work somehow. How
can I make it happen? Is there a function that I should use, a special
trick, etc? Or is there just no way to make it work? Thanks!
 
G

Gerald Klix

if you write
B = '\x12','\x32'
you get an immutable tuple.

To get a mutable list use:
B = [ '\x12','\x32' ]

HTH,
Gerald
As a bit more of an update, I have decided to create a list of strings,
but am having a problem. To illistrate this in a simple manner.

B='\x12','\x32'
B[0]='\x12'

I cannot get this to work, and I need to get it to work somehow. How
can I make it happen? Is there a function that I should use, a special
trick, etc? Or is there just no way to make it work? Thanks!
 
L

Lonnie Princehouse

B is a tuple if it's assigned that way. Tuples are immutable.
To make a list instead, you need square brackets:
B = ['\x12', '\x32']

Regarding your original post, you'll probably have to ask more specific
questions if you want to get good answers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top