Python GUIs

Discussion in 'Python' started by Tuvas, Sep 21, 2005.

  1. Tuvas

    Tuvas Guest

    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!
    Tuvas, Sep 21, 2005
    #1
    1. Advertising

  2. Tuvas

    Tuvas Guest

    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!
    Tuvas, Sep 21, 2005
    #2
    1. Advertising

  3. Tuvas

    Gerald Klix Guest

    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
    Gerald Klix, Sep 21, 2005
    #3
  4. 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.
    Lonnie Princehouse, Sep 21, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Basile STARYNKEVITCH
    Replies:
    0
    Views:
    319
    Basile STARYNKEVITCH
    Sep 2, 2003
  2. Christopher Culver

    OO design, Python, and GUIs

    Christopher Culver, Nov 18, 2003, in forum: Python
    Replies:
    3
    Views:
    397
    Alan Gauld
    Nov 18, 2003
  3. Andrew McLean

    Driving win32 GUIs with Python

    Andrew McLean, Dec 19, 2004, in forum: Python
    Replies:
    2
    Views:
    442
    Andrew McLean
    Dec 20, 2004
  4. Bob Swerdlow

    Windows GUIs from Python

    Bob Swerdlow, Jan 11, 2005, in forum: Python
    Replies:
    7
    Views:
    382
    Jon Perez
    Jan 12, 2005
  5. Dan

    Re: Python GUIs

    Dan, Sep 21, 2005, in forum: Python
    Replies:
    1
    Views:
    310
    Tuvas
    Sep 21, 2005
Loading...

Share This Page