LED-like control with degrees symbol?

Hi,

I'm relatively new to wxPython. I'm a senior at Rutgers University,
majoring in IT, and am working on a Linux-based "CarPC" as a personal
project (http://www.jasonantman.com/tuxtruck/). I've decided to use
wxPython for the GUI.

I've looked into both LEDCtrl by E.A. Tacao and the LEDNumberCtrl. Does
anyone know of/have a smiliar looking widget that supports the degrees
symbol, to display temperature?

Thanks,
Jason

PS - I'm still pretty new to wxPython, and would rather, if possible,
not have to code the changes myself...

Jason Antman wrote:

Hi,

I'm relatively new to wxPython. I'm a senior at Rutgers University,
majoring in IT, and am working on a Linux-based "CarPC" as a personal
project (GitHub - jantman/tuxtruck: Aborted attempt at a Python/Linux-based CarPC platform. Some of the OBD and GPS code might be useful, and there's Python code to read the accelerometer on a SunSPOT.). I've decided to use
wxPython for the GUI.

I've looked into both LEDCtrl by E.A. Tacao and the LEDNumberCtrl. Does
anyone know of/have a smiliar looking widget that supports the degrees
symbol, to display temperature?

I don't know of any others like that, but it shouldn't be too hard of a modification to do.

You may also want to look at the SppedMeter and others here: http://xoomer.alice.it/infinity77/main/freeware.html

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Monday, May 12, 2008, 1:52:33 PM, Jason Antman wrote:

I've looked into both LEDCtrl by E.A. Tacao and the LEDNumberCtrl.
Does anyone know of/have a smiliar looking widget that supports the
degrees symbol, to display temperature?

There's a dictionary named _opts in LEDCtrl.py (lines 176 to 198) that
'translates' characters (keys) to segments (values). The values are
strings of seven digits, either 1s or 0s, where the first digit
relates to the a segment, the second to b, ... the seventh to g.

E. g., in line 177:
    "1" : "0110000"
means that for the character "1" only the b and c segments will be lit,
and in line 192:
    "-" : "0000001"
means that for the character "-" only the g segment will be lit, and
so on.

Knowing that, it's easy to produce the degrees symbol just by adding
an item to that dict:
    chr(176) : "1100011"

After inserting that item, try the demo by inserting an <Alt>+0176
char in the value box. The C and F are already supported so now it'll
be able to show both celsius and fahrenheit. :slight_smile:

PS - I'm still pretty new to wxPython, and would rather, if possible,
not have to code the changes myself...

Too late. But it was only ONE line, anyway. :wink:

-- tacao

No bits were harmed during the making of this e-mail.

Thanks!!!

I started to look through the code and remember seeing those strings, but for some reason something distracted me...

Thanks Again, Tacao.

-Jason

E. A. Tacao wrote:

···

Monday, May 12, 2008, 1:52:33 PM, Jason Antman wrote:

I've looked into both LEDCtrl by E.A. Tacao and the LEDNumberCtrl.
Does anyone know of/have a smiliar looking widget that supports the
degrees symbol, to display temperature?
    
There's a dictionary named _opts in LEDCtrl.py (lines 176 to 198) that
'translates' characters (keys) to segments (values). The values are
strings of seven digits, either 1s or 0s, where the first digit
relates to the a segment, the second to b, ... the seventh to g.

E. g., in line 177:
    "1" : "0110000"
means that for the character "1" only the b and c segments will be lit,
and in line 192:
    "-" : "0000001"
means that for the character "-" only the g segment will be lit, and
so on.

Knowing that, it's easy to produce the degrees symbol just by adding
an item to that dict:
    chr(176) : "1100011"

After inserting that item, try the demo by inserting an <Alt>+0176
char in the value box. The C and F are already supported so now it'll
be able to show both celsius and fahrenheit. :slight_smile:

PS - I'm still pretty new to wxPython, and would rather, if possible,
not have to code the changes myself...
    
Too late. But it was only ONE line, anyway. :wink:

-- tacao

No bits were harmed during the making of this e-mail.

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users