--
You received this message because you are subscribed to a topic in the Google Groups "wxPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/MLMjUHfqEbU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Werner
app = MyApp(False)
app.MainLoop()
if __name__ == "__main__":
main()oh I guess you'd have to create a main function first:
def main():app = MyApp(False) app.MainLoop()if __name__ == "__main__": main()
See below.Hi Werner,
Now i have made amendments to my program and its working now...but there is a new problem now....I am now calling a python script generated by GNU Radio Companion(for those who know about GRC will understand my question better)...when i press the execute button i get the following error..
check the attributes on line 401, what are baseband_freq and sample_rate containing?Both files are as attached.Is there a different way to call a script generated by GRC??Actually i want to create a GUI and then call different GRC files from it.
Form: <class 'gnuradio.wxgui.forms.forms.text_box'> -> Error translating value: "<__main__.MyFrame; proxy of <Swig Object of type 'wxFrame *' at 0x30f44a0> >"
bad operand type for abs(): 'MyFrame'
Enter a float with optional scale suffix. E.g., 100.1M
Form: <class 'gnuradio.wxgui.forms.forms.slider'> -> Error translating value: "<__main__.MyFrame; proxy of <Swig Object of type 'wxFrame *' at 0x30f44a0> >"
unsupported operand type(s) for -: 'MyFrame' and 'float'
Value should be within slider range
Using Volk machine: avx_64_mmx_orc
Traceback (most recent call last):
File "wxgui.py", line 26, in Execute
self.aNewFrame = uhd_fft.uhd_fft(self)
File "/home/ali/Desktop/WXGUI/uhd_fft.py", line 155, in __init__
size=((-1, 400)),
File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/fftsink_gl.py", line 126, in __init__
persist_alpha=persist_alpha,
File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/fft_window.py", line 304, in __init__
self.update_grid()
File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/fft_window.py", line 401, in update_grid
baseband_freq - sample_rate/2.0,
TypeError: unsupported operand type(s) for -: 'MyFrame' and 'float'
Here a string or Unicode is expected, check out line 248 in forms.pyTraceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/forms/forms.py", line 102, in <lambda>
widget.Bind(EVT_DATA, lambda x: self._update(x.data))
File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/forms/forms.py", line 248, in _update
def _update(self, value): self._text_box.SetValue(value); self._update_color()
File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 1754, in SetValue
return _controls_.TextCtrl_SetValue(*args, **kwargs)
TypeError: String or Unicode type required
Line 181 in forms.py is wanting a float for that SetValue but it is converted to an int.Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/forms/forms.py", line 102, in <lambda>
widget.Bind(EVT_DATA, lambda x: self._update(x.data))
File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/forms/forms.py", line 181, in _update
def _update(self, value): self._slider.SetValue(int(round(value)))
TypeError: a float is required