[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7794 - in grc/branches/grc_reloaded: . scripts src sr
From: |
jblum |
Subject: |
[Commit-gnuradio] r7794 - in grc/branches/grc_reloaded: . scripts src src/grc src/grc/platforms/gnuradio_python src/grc/platforms/gnuradio_python/data src/grc_gnuradio |
Date: |
Sat, 23 Feb 2008 10:58:25 -0700 (MST) |
Author: jblum
Date: 2008-02-23 10:58:24 -0700 (Sat, 23 Feb 2008)
New Revision: 7794
Added:
grc/branches/grc_reloaded/scripts/
grc/branches/grc_reloaded/scripts/grc
grc/branches/grc_reloaded/src/grc/data/
grc/branches/grc_reloaded/src/grc_gnuradio/
grc/branches/grc_reloaded/src/grc_gnuradio/blks2/
grc/branches/grc_reloaded/src/grc_gnuradio/usrp/
grc/branches/grc_reloaded/src/grc_gnuradio/wxgui/
Removed:
grc/branches/grc_reloaded/data/
grc/branches/grc_reloaded/examples/
grc/branches/grc_reloaded/src/grc/blks2/
grc/branches/grc_reloaded/src/grc/usrp/
grc/branches/grc_reloaded/src/grc/wxgui/
Modified:
grc/branches/grc_reloaded/src/grc/Constants.py
grc/branches/grc_reloaded/src/grc/__init__.py
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Generator.py
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/data/block_tree.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/data/wx_gui.tmpl
Log:
preparing directory for setup script
Added: grc/branches/grc_reloaded/scripts/grc
===================================================================
--- grc/branches/grc_reloaded/scripts/grc (rev 0)
+++ grc/branches/grc_reloaded/scripts/grc 2008-02-23 17:58:24 UTC (rev
7794)
@@ -0,0 +1,56 @@
+#! /usr/bin/env python
+"""
+Copyright 2008 Free Software Foundation, Inc.
+This file is part of GNU Radio
+
+GNU Radio Companion is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+GNU Radio Companion is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+"""
address@hidden Editor
+#Execute the flow graph editor GUI. This file must be called by the python
interpreter.
address@hidden Josh Blum
+
+from grc.Constants import VERSION,FLOW_GRAPH_FILE_EXTENSION
+from optparse import OptionParser
+
+if __name__ == "__main__":
+ usage = 'usage: %prog
[optional_flow_graphs'+FLOW_GRAPH_FILE_EXTENSION+']'
+ version = """
+GNU Radio Companion %s
+
+This program is part of GNU Radio
+GRC comes with ABSOLUTELY NO WARRANTY.
+This is free software,
+and you are welcome to redistribute it.
+"""%VERSION
+ parser = OptionParser(usage=usage, version=version)
+ (options, args) = parser.parse_args()
+ #"test" import modules that this program will use
+ error = False
+ for module in ('pygtk', 'wx', 'numpy', 'xml.dom.minidom',
'xml.dom.ext', 'gnuradio', 'gnuradio.gr.hier_block2', 'Cheetah'):
+ try: __import__(module)
+ except ImportError: #print error
+ error = True
+ print '\nMissing critical module: "%s"'%module
+ if error: #exit
+ print '\nExiting!\n'
+ exit(-1)
+ #end import of modules
+ from grc.platforms.gnuradio_python.Platform import Platform
+ platform = Platform()
+ from grc.gui.elements.Platform import Platform
+ platform = Platform(platform)
+ from grc.ActionHandler import ActionHandler
+ ActionHandler(args, platform)
+
Property changes on: grc/branches/grc_reloaded/scripts/grc
___________________________________________________________________
Name: svn:executable
+ *
Modified: grc/branches/grc_reloaded/src/grc/Constants.py
===================================================================
--- grc/branches/grc_reloaded/src/grc/Constants.py 2008-02-23 17:46:43 UTC
(rev 7793)
+++ grc/branches/grc_reloaded/src/grc/Constants.py 2008-02-23 17:58:24 UTC
(rev 7794)
@@ -180,7 +180,7 @@
SRC_DIR = os.path.abspath(os.path.dirname(__file__))
##Location of external data files.
-DATA_DIR = os.path.abspath(SRC_DIR + '/../../data/')
+DATA_DIR = os.path.abspath(SRC_DIR + '/data/')
##The default file extension for flow graphs.
FLOW_GRAPH_FILE_EXTENSION = '.grc.xml'
Modified: grc/branches/grc_reloaded/src/grc/__init__.py
===================================================================
--- grc/branches/grc_reloaded/src/grc/__init__.py 2008-02-23 17:46:43 UTC
(rev 7793)
+++ grc/branches/grc_reloaded/src/grc/__init__.py 2008-02-23 17:58:24 UTC
(rev 7794)
@@ -17,17 +17,6 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
"""
address@hidden grc
-#grc gui package.
+#grc package.
address@hidden Josh Blum
-from grc.platforms.gnuradio_python.Platform import Platform
-
-platform = Platform()
-
-from grc.gui.elements.Platform import Platform
-
-platform = Platform(platform)
-
-from grc.ActionHandler import ActionHandler
-
-ActionHandler([], platform)
Copied: grc/branches/grc_reloaded/src/grc/data (from rev 7792,
grc/branches/grc_reloaded/data)
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Generator.py
===================================================================
--- grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Generator.py
2008-02-23 17:46:43 UTC (rev 7793)
+++ grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Generator.py
2008-02-23 17:58:24 UTC (rev 7794)
@@ -62,11 +62,18 @@
#build the template
t = Template(open(NO_GUI_TEMPLATE, 'r').read(),
namespace)
elif self._flow_graph.get_option('generate_options') ==
'wx_gui':
+ #separate variables with wx controls
+ sliders = filter(lambda v: v.get_key() ==
'variable_slider', variables)
+ buttons = filter(lambda v: v.get_key() ==
'variable_button', variables)
+ drop_downs = filter(lambda v: v.get_key() ==
'variable_drop_down', variables)
#load the namespace
namespace = {
'imports': imports,
'flow_graph': self._flow_graph,
'variables': variables,
+ 'sliders': sliders,
+ 'buttons': buttons,
+ 'drop_downs': drop_downs,
'blocks': blocks,
'connections':
self._flow_graph.get_connections(),
}
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/data/block_tree.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/data/block_tree.xml
2008-02-23 17:46:43 UTC (rev 7793)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/data/block_tree.xml
2008-02-23 17:58:24 UTC (rev 7794)
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE block_tree SYSTEM "../../../../../data/block_tree.dtd">
+<!DOCTYPE block_tree SYSTEM "../../../data/block_tree.dtd">
<!--
###################################################
##Block Tree for platform gnuradio python.
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/data/wx_gui.tmpl
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/data/wx_gui.tmpl
2008-02-23 17:46:43 UTC (rev 7793)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/data/wx_gui.tmpl
2008-02-23 17:58:24 UTC (rev 7794)
@@ -6,8 +6,13 @@
address@hidden variables the variable blocks
address@hidden blocks the signal blocks
address@hidden connections the connections
address@hidden sliders variable blocks for sliders
address@hidden buttons variable blocks for buttons
address@hidden drop_downs variable blocks for drop_downs
########################################################
#import time
+#import os
+#from grc.Constants import WX_APP_ICON
$('#'*40)
# Gnuradio Python Flow Graph (wx gui)
$('# Name: %s'%$flow_graph.get_option('name'))
@@ -28,6 +33,9 @@
def __init__(self):
wx.Frame.__init__(self, None , -1, 'xxx' + ' - Executing: ' +
'xxx')
+#if $WX_APP_ICON
+ self.SetIcon(wx.Icon($os.path.abspath($WX_APP_ICON),
wx.BITMAP_TYPE_ANY))
+#end if
self.SetSizeHints(200, 100)
main_box = wx.BoxSizer(wx.VERTICAL)
self.Bind(wx.EVT_CLOSE, self._quit)
Copied: grc/branches/grc_reloaded/src/grc_gnuradio/blks2 (from rev 7792,
grc/branches/grc_reloaded/src/grc/blks2)
Copied: grc/branches/grc_reloaded/src/grc_gnuradio/usrp (from rev 7792,
grc/branches/grc_reloaded/src/grc/usrp)
Copied: grc/branches/grc_reloaded/src/grc_gnuradio/wxgui (from rev 7792,
grc/branches/grc_reloaded/src/grc/wxgui)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7794 - in grc/branches/grc_reloaded: . scripts src src/grc src/grc/platforms/gnuradio_python src/grc/platforms/gnuradio_python/data src/grc_gnuradio,
jblum <=