Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python GUIs

Reply
Thread Tools

Python GUIs

 
 
Tuvas
Guest
Posts: n/a
 
      09-21-2005
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!

 
Reply With Quote
 
 
 
 
Tuvas
Guest
Posts: n/a
 
      09-21-2005
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!

 
Reply With Quote
 
 
 
 
Gerald Klix
Guest
Posts: n/a
 
      09-21-2005
if you write
B = '\x12','\x32'
you get an immutable tuple.

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

HTH,
Gerald

Tuvas schrieb:
> 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!
>


--
GPG-Key: http://keyserver.veridis.com:11371/search?q=0xA140D634

 
Reply With Quote
 
Lonnie Princehouse
Guest
Posts: n/a
 
      09-21-2005
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Python GUIs Dan Python 1 09-21-2005 07:14 PM
Windows GUIs from Python Bob Swerdlow Python 7 01-12-2005 08:09 AM
Driving win32 GUIs with Python Andrew McLean Python 2 12-20-2004 12:07 AM
OO design, Python, and GUIs Christopher Culver Python 3 11-18-2003 11:41 PM
ANN: Guis-1.3 a GTK2 widget server (scriptable in Python & Ruby) Basile STARYNKEVITCH Python 0 09-02-2003 02:42 PM



Advertisments