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! 3 1228
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!
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
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Edilmar |
last post by:
Hi,
First of all, I'm new in Python...
I have worked with manu langs and IDEs, like Delphi, VB, JBuilder, Eclipse,
Borland C++, Perl, etc...
Then, today I think IDEs like Delphi have a excelent environment to develop
apps with little time. I saw many people talking about Python like a easy
lang to learn and to develop. But I have look...
|
by: Andr? Roberge |
last post by:
Sorry about the cryptic subject line, but I wanted to capture the
essence of my message in a single line.
I am learning Python (which, as everyone know is the best language :-)
so that I can write a tutorial to teach my kids about computer
programming. The motivation for them will be to use Python to create
their own games using pygame...
|
by: Davor |
last post by:
Is it possible to write purely procedural code in Python, or the OO
constructs in both language and supporting libraries have got so
embedded that it's impossible to avoid them? Also, is anyone aware of
any scripting language that could be considered as "Python minus OO
stuff"? (As you can see I'm completely new to Python and initially...
|
by: Kenneth McDonald |
last post by:
If this is not an appropriate newsgroup for this type of posting,
please let me know and (if possible) suggest an alternative. I've
done a fair bit of research on the net, but information is scattered
all over the place and I haven't been able to find mailing lists
relating specifically to python and UIs.
I'd like to start using Python for...
|
by: Michael Tobis |
last post by:
Someone asked me to write a brief essay regarding the value-add
proposition for Python in the Fortran community. Slightly modified to
remove a few climatology-related specifics, here it is.
I would welcome comments and corrections, and would be happy to
contribute some version of this to the Python website if it is of
interest.
===
| |
by: Xah Lee |
last post by:
Python, Lambda, and Guido van Rossum
Xah Lee, 2006-05-05
In this post, i'd like to deconstruct one of Guido's recent blog about
lambda in Python.
In Guido's blog written in 2006-02-10 at
http://www.artima.com/weblogs/viewpost.jsp?thread=147358
|
by: 63q2o4i02 |
last post by:
Hi, I'm interested in using python to start writing a CAD program for
electrical design. I just got done reading Steven Rubin's book, I've
used "real" EDA tools, and I have an MSEE, so I know what I *want* at
the end of this; I just have never taken on a programming task of this
magnitude. I've seen that some are using python as a utility...
|
by: H J van Rooyen |
last post by:
Hi,
I want to write a small system that is transaction based.
I want to split the GUI front end data entry away from the file handling and
record keeping.
Now it seems almost trivially easy using the sockets module to communicate
between machines on the same LAN, so that I want to do the record keeping on one
machine.
|
by: gord |
last post by:
As a complete novice in the study of Python, I am asking myself where this
language is superior or better suited than others. For example, all I see in
the tutorials are lots of examples of list processing, arithmetic
calculations - all in a DOS-like environment.
What is particularly disappointing is the absence of a Windows IDE,
components...
|
by: koutoo |
last post by:
I am new to python as I have been a VB programmer. I am used to the
GUI interface, and was wondering if I had to choose between a GUI for
Python, which one should I go with? Thanks.
Kou
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |