grunculus wrote:
Hi Tom and All,
Thanks for the Fourier demo. It's a very nice piece of code. I'm
still a newbie in wxPython and your example is very helpful.
(I tried e-mailing you the questions below to the address you gave in
the Wiki, but it bounced back.)
You're welcome, I'm glad you find it helpful!
Sorry about the email bounces, my domain name registration had expired which
I have now renewed, so emails to that address should now go through.
grunculus wrote:
1) The values in the text boxes do not update as the graphs are
adjusted or as the sliders are moved with the mouse - the mouse button
has to be up to see the updated values in the text boxes. Is there a
way to somehow incorporate updating the text values in the mouseDown
function or elsewhere?
I have noticed different behavior here on linux and mac - on the mac, the
string in the TextCtrl updates immediately, while on linux, the string seems
to wait until the mouse motion stops. However on linux the string updates
without requiring a mouse up, that is during the same drag the TextCtrl
updates once I pause the motion. I'm not sure how to explain the platform
differences.
grunculus wrote:
2) Is there any significance to the use of upper and lower case
spellings of "knob" in your Knob class and in your Param class? I
understand that Python is case sensitive for variable names, etc., but
it seems that in your code when you're passing parameters that it
doesn't matter. Am I missing something? Can you elaborate a little?
The significance is that I am trying to follow a certain style that is
meaningful to me when I read the code at a later time. Hopefully the style
is consistent enough to be decipherable by others as well. As for styles,
see the "pep8" (PEP 8 – Style Guide for Python Code | peps.python.org) guidelines as an
often cited and presumably often employed set of rules for naming arguments,
classes, attributes, etc. I am not following pep8 with perhaps the most
significant departure being that I use a camelCase convention for methods,
whereas pep8 is lower_case_with_underscores.
Classes in particular begin with upper case and follow camel case after
that, e.g. CamelCaseClass - I think this is according to pep8 and I follow
that style in the code that I have posted for class names.
If the wxPython crowd feels strongly about it, I can post a corrected
siggemo.py that is more in accordance with a desired style. I haven't spent
much time reading the wxPython code to know which style it follows. I spent
more time reading the matplotlib code which seemed to be following pep8 or
some variant.
Best,
Tom K.
···
--
View this message in context: http://www.nabble.com/FourierDemo-now-on-wxPyWiki-tp21500345p21531638.html
Sent from the wxPython-users mailing list archive at Nabble.com.