font.GetWeightString

Hi All

font.GetWeightString() returns wxNORMAL or wxBOLD but it
should return wx.NORMAL or wx.BOLD.

Is this a bug, or am I missing something?

font.GetWeight works Ok (it returns a int 90 or 92 that are
the values for wx.NORMAL or wx.BOLD)

Here: wxPython 2.8.0.0 Unicode on XP

Thanks

AB

António Barbosa (GN/dpi) wrote:

Hi All

font.GetWeightString() returns wxNORMAL or wxBOLD but it should return wx.NORMAL or wx.BOLD.

Is this a bug, or am I missing something?

GetWeightString is a simple wrapper around a C++ function so it is just returning the C++ name of the value. It's not intended to be used for anything other than display so I didn't think it would be worth the effort to translate the string to the wxPython equivalent.

···

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

Hello,

I am running a lab experiment and I would like to use Python to run my
'picoscope' a nice oscilloscope that I can control from my desktop
through a USB. They have the c code, a dll, and labview files that I can
use to talk to the picoscope. However I'm far more familiar with python
than these other items. Can I use COM to talk to the picoscope via the
dll they provided? Does COM talk to the dll's? They have fairly good
documentation regarding the functions available through the dll's; I'm
accessing this dll now using labview and it works pretty well, but I'm
not sure how to access the dll with python.

How might this work?

Thanks!

Jeff

Jeff Peery wrote:

Hello,

I am running a lab experiment and I would like to use Python to run my
'picoscope' a nice oscilloscope that I can control from my desktop
through a USB. They have the c code, a dll, and labview files that I can
use to talk to the picoscope. However I'm far more familiar with python
than these other items. Can I use COM to talk to the picoscope via the
dll they provided? Does COM talk to the dll's? They have fairly good
documentation regarding the functions available through the dll's; I'm
accessing this dll now using labview and it works pretty well, but I'm
not sure how to access the dll with python.

How might this work?

Try using the ctypes module.

···

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

please get me off this mailing list.

I've tried so many times.

God, I hate it.

thank you.