Python GUIs

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tuvas

    #1

    Python GUIs

    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

    #2
    Re: Python GUIs

    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!

    Comment

    • Gerald Klix

      #3
      Re: Python GUIs

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

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

      HTH,
      Gerald

      Tuvas schrieb:[color=blue]
      > 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!
      >[/color]

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

      Comment

      • Lonnie Princehouse

        #4
        Re: Python GUIs

        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.

        Comment

        Working...