discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] GRCC No GUI?


From: Dan CaJacob
Subject: Re: [Discuss-gnuradio] GRCC No GUI?
Date: Tue, 18 Jun 2013 16:09:02 -0400

Josh and Tom,

I'll try to go back and look into where I left it.  I had taken your advice and basically changed all the relevant classes to not inherit the GUI stuff, but I still ended up with an untenable error in the end, that now that you mention it, I think was related to Param.py...  As I recall, the weird thing was that the error did not match up with the source file it was referencing.

Sorry, I know this is super vague.  So, I'll just dig back into it and come back with more specifics.

Thanks!

Very Respectfully,

Dan CaJacob


On Tue, Jun 18, 2013 at 3:30 PM, Josh Blum <address@hidden> wrote:

>
> Following up on a comment Josh made in the earlier discussion about GRCC, I
> tried to pull out all of the GUI references that the GRCC tool depends on,
> but I still ended up with an enigmatic error in the end.  Unfortunately,
> this was done two weeks ago and I don't have any good info on where I left
> it.
>
>

I think I had mentioned that GRCC could import the non-gui stuff, from
the grc/python directory, and that would avoid the import gtk statement,
which is messing up the ability to do non gui stuff.

So looking into grc/python
> ~/src/gnuradio/grc/python$ grep gtk *
> flow_graph.tmpl:        #import gtk
> flow_graph.tmpl:        #set $icon = gtk.IconTheme().lookup_icon('gnuradio-grc', 32, 0)
> Param.py:import pygtk
> Param.py:pygtk.require('2.0')
> Param.py:import gtk
> Param.py:               input = gtk.Button('...')
> Param.py:                       file_dialog = gtk.FileChooserDialog('Open a Data File...', None,
> Param.py:                               gtk.FILE_CHOOSER_ACTION_OPEN, ('gtk-cancel',gtk.RESPONSE_CANCEL,'gtk-open',gtk.RESPONSE_OK))
> Param.py:                       file_dialog = gtk.FileChooserDialog('Save a Data File...', None,
> Param.py:                               gtk.FILE_CHOOSER_ACTION_SAVE, ('gtk-cancel',gtk.RESPONSE_CANCEL, 'gtk-save',gtk.RESPONSE_OK))
> Param.py:               if gtk.RESPONSE_OK == file_dialog.run(): #run the dialog

It looks like only the Param.py would cause a runtime import issue with
gtk/pygtk. In this case, that imprt statement could be moved to the
indentation level where it is used (file dialog).

Did you notice other modules pulling gtk imports that should not have?
Or were you unable to rewrite the GRCC to completely avoid importing
modules from grc/gui?

-josh

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

[Prev in Thread] Current Thread [Next in Thread]