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: Josh Blum
Subject: Re: [Discuss-gnuradio] GRCC No GUI?
Date: Tue, 18 Jun 2013 15:30:19 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

> 
> 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



reply via email to

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