[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9497 - in gnuradio/branches/developers/jblum/grc_reor
From: |
jblum |
Subject: |
[Commit-gnuradio] r9497 - in gnuradio/branches/developers/jblum/grc_reorganize/grc: data/platforms scripts src/gui src/platforms src/platforms/base src/platforms/gui src/platforms/python src/platforms/python/utils src/utils |
Date: |
Thu, 4 Sep 2008 00:36:40 -0600 (MDT) |
Author: jblum
Date: 2008-09-04 00:36:40 -0600 (Thu, 04 Sep 2008)
New Revision: 9497
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/data/platforms/
gnuradio/branches/developers/jblum/grc_reorganize/grc/scripts/grc
gnuradio/branches/developers/jblum/grc_reorganize/grc/scripts/usrp_diagnostics
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ActionHandler.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/Dialogs.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/FileDialogs.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/Messages.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ParamsDialog.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/Preferences.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/Makefile.am
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Block.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Connection.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Constants.py.in
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Element.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/FlowGraph.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Param.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Platform.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Port.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Block.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Connection.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Element.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/FlowGraph.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Param.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Platform.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Port.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Utils.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Block.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Connection.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/FlowGraph.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Generator.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Param.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Platform.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Port.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/utils/convert_hier.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/utils/expr_utils.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/utils/extract_docs.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/utils/
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/utils/ParseXML.py
Log:
work on import statements
Property changes on:
gnuradio/branches/developers/jblum/grc_reorganize/grc/data/platforms
___________________________________________________________________
Name: svn:ignore
+ Makefile
Makefile.in
Modified: gnuradio/branches/developers/jblum/grc_reorganize/grc/scripts/grc
===================================================================
--- gnuradio/branches/developers/jblum/grc_reorganize/grc/scripts/grc
2008-09-04 06:27:32 UTC (rev 9496)
+++ gnuradio/branches/developers/jblum/grc_reorganize/grc/scripts/grc
2008-09-04 06:36:40 UTC (rev 9497)
@@ -17,12 +17,8 @@
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
-import grc
-from grc.Constants import VERSION,FLOW_GRAPH_FILE_EXTENSION
+from gnuradio.grc.platforms.base.Constants import VERSION,
FLOW_GRAPH_FILE_EXTENSION
from optparse import OptionParser
if __name__ == "__main__":
@@ -37,7 +33,7 @@
"""%VERSION
parser = OptionParser(usage=usage, version=version)
(options, args) = parser.parse_args()
- from grc_gnuradio.Platform import Platform
- from grc.ActionHandler import ActionHandler
+ from gnuradio.grc.platforms.python.Platform import Platform
+ from gnuradio.grc.gui.ActionHandler import ActionHandler
ActionHandler(args, Platform())
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/scripts/usrp_diagnostics
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/scripts/usrp_diagnostics
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/scripts/usrp_diagnostics
2008-09-04 06:36:40 UTC (rev 9497)
@@ -17,9 +17,6 @@
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 Graphics.USRPDiagnostics
-#A dialog for querying USRP subdevices. USRP interfacing methods encapsulated
here.
address@hidden Josh Blum
from gnuradio import usrp
import os
@@ -28,12 +25,12 @@
pygtk.require('2.0')
import gtk
-from grc.gui.Dialogs import TextDisplay
+from gnuradio.grc.gui.Dialogs import TextDisplay
-from grc_gnuradio.Platform import Platform
+from gnuradio.grc.platforms.python.Platform import Platform
platform = Platform(block_paths_internal_only=['usrp_diagnostics.xml'])
-from grc.gui.elements.Platform import Platform
+from gnuradio.grc.platforms.gui.Platform import Platform
platform = Platform(platform)
flow_graph = platform.get_new_flow_graph()
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ActionHandler.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ActionHandler.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ActionHandler.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,8 +16,6 @@
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 ActionHandler
-#ActionHandler builds the interface and handles most of the user inputs.
import os
import signal
@@ -26,14 +24,17 @@
import pygtk
pygtk.require('2.0')
import gtk
-import gui
import Preferences
from threading import Thread
import Messages
-import ParseXML
+from .. utils import ParseXML
import random
-from grc.gui.elements.Platform import Platform
+from .. platforms.gui.Platform import Platform
+from MainWindow import MainWindow
+from Dialogs import PreferencesDialog, AboutDialog, HotKeysDialog
+from FileDialogs import OpenFlowGraphFileDialog, SaveFlowGraphFileDialog,
SaveImageFileDialog
+
class ActionHandler:
"""
The action handler will setup all the major window components,
@@ -53,7 +54,7 @@
if PY_GTK_ICON:
gtk.window_set_default_icon_from_file(PY_GTK_ICON)
for action in ACTIONS_LIST: action.connect('activate',
self._handle_actions)
#setup the main window
- self.main_window = gui.MainWindow(self.handle_states, platform)
+ self.main_window = MainWindow(self.handle_states, platform)
self.main_window.connect('delete_event', self._quit)
self.main_window.connect('key_press_event',
self._handle_key_press)
self.get_page = self.main_window.get_page
@@ -276,12 +277,12 @@
# Window stuff
##############################################################################################
elif state == PREFS_WINDOW_DISPLAY:
- gui.PreferencesDialog()
+ PreferencesDialog()
self.get_flow_graph().update()
elif state == ABOUT_WINDOW_DISPLAY:
- gui.AboutDialog()
+ AboutDialog()
elif state == HOTKEYS_WINDOW_DISPLAY:
- gui.HotKeysDialog()
+ HotKeysDialog()
##############################################################################################
# Param Modifications
##############################################################################################
@@ -313,7 +314,7 @@
elif state == FLOW_GRAPH_NEW:
self.main_window.new_page()
elif state == FLOW_GRAPH_OPEN:
- file_paths =
gui.OpenFlowGraphFileDialog(self.get_page().get_file_path()).run()
+ file_paths =
OpenFlowGraphFileDialog(self.get_page().get_file_path()).run()
if file_paths: #open a new page for each file, show
only the first
for i,file_path in enumerate(file_paths):
self.main_window.new_page(file_path,
show=(i==0))
@@ -329,12 +330,12 @@
Messages.send_fail_save(self.get_page().get_file_path())
self.get_page().set_saved(False)
elif state == FLOW_GRAPH_SAVE_AS:
- file_path =
gui.SaveFlowGraphFileDialog(self.get_page().get_file_path()).run()
+ file_path =
SaveFlowGraphFileDialog(self.get_page().get_file_path()).run()
if file_path != None:
self.get_page().set_file_path(file_path)
self.handle_states(FLOW_GRAPH_SAVE)
elif state == FLOW_GRAPH_SCREEN_CAPTURE:
- file_path =
gui.SaveImageFileDialog(self.get_page().get_file_path()).run()
+ file_path =
SaveImageFileDialog(self.get_page().get_file_path()).run()
if file_path != None:
pixmap =
self.get_flow_graph().get_drawing_area().pixmap
width, height = pixmap.get_size()
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/Dialogs.py
===================================================================
--- gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/Dialogs.py
2008-09-04 06:27:32 UTC (rev 9496)
+++ gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/Dialogs.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,14 +16,12 @@
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 grc.gui.Dialogs
-#Misc dialogs.
import pygtk
pygtk.require('2.0')
import gtk
-from grc.Constants import *
-from grc import Preferences
+from Constants import *
+import Preferences
class TextDisplay(gtk.TextView):
"""A non editable gtk text view."""
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/FileDialogs.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/FileDialogs.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/FileDialogs.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,8 +16,6 @@
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 grc.gui.FileDialogs
-#The open/save dialog for flow graph fFileDialogiles and screen shots.
import pygtk
pygtk.require('2.0')
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/Messages.py
===================================================================
--- gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/Messages.py
2008-09-04 06:27:32 UTC (rev 9496)
+++ gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/Messages.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,10 +16,8 @@
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 Messages
-#Handle all of the system messages and error reports.
-from Constants import VERSION
+from .. platforms.base.Constants import VERSION
import traceback
import sys
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ParamsDialog.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ParamsDialog.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ParamsDialog.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,15 +16,13 @@
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 grc.gui.ParamsDialog
-#A dialog for editing a block's parameters.
import pygtk
pygtk.require('2.0')
import gtk
from Dialogs import TextDisplay
-from grc.Constants import MIN_DIALOG_WIDTH,MIN_DIALOG_HEIGHT
+from Constants import MIN_DIALOG_WIDTH, MIN_DIALOG_HEIGHT
def get_title_label(title):
"""!
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/Preferences.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/Preferences.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/Preferences.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,11 +16,9 @@
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 grc.Preferences
-#Holds global paramerences
-from Constants import HOME_DIR, FLOW_GRAPH_DTD
-import ParseXML
+from .. platforms.base.Constants import HOME_DIR, FLOW_GRAPH_DTD
+from .. utils import ParseXML
import Messages
import os
Property changes on:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms
___________________________________________________________________
Name: svn:ignore
+ Makefile
Makefile.in
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/Makefile.am
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/Makefile.am
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/Makefile.am
2008-09-04 06:36:40 UTC (rev 9497)
@@ -24,7 +24,7 @@
SUBDIRS = \
base \
gui \
- python \
+ python
ourpythondir = $(grc_src_prefix)/platforms
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Block.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Block.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Block.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,14 +16,12 @@
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 grc.elements.Block
-#Flow graph block.
-from grc import Utils
-from grc.Utils import odict
-from grc.elements.Element import Element
-from grc.elements.Param import Param
-from grc.elements.Port import Port
+from ... import utils
+from ... utils import odict
+from Element import Element
+from Param import Param
+from Port import Port
from Cheetah.Template import Template
from UserDict import UserDict
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Connection.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Connection.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Connection.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,14 +16,9 @@
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 grc.elements.Connection
-#Flow graph connection.
-#A connection exists between 2 ports.
-#One port must be input, one output.
-#The port decided whether it can have the connection.
-from grc.elements.Element import Element
-from grc.Utils import odict
+from Element import Element
+from ... utils import odict
class Connection(Element):
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Constants.py.in
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Constants.py.in
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Constants.py.in
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,9 +16,6 @@
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 grc.Constants
-#Global constants
address@hidden Josh Blum
import os
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Element.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Element.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Element.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,8 +16,6 @@
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 grc.elements.Element
-#The base class for all elements.
class Element(object):
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/FlowGraph.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/FlowGraph.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/FlowGraph.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,17 +16,14 @@
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 grc.elements.FlowGraph
-#Primative flow graph.
-from grc import Utils
-from grc.Utils import odict
-from grc.elements.Element import Element
-from grc.elements.Block import Block
-from grc.elements.Connection import Connection
+from ... import utils
+from ... utils import odict
+from Element import Element
+from Block import Block
+from Connection import Connection
+from ... gui import Messages
-from grc import Messages
-
class FlowGraph(Element):
def __init__(self, platform):
@@ -185,8 +182,8 @@
else:
Messages.send_error_load('Flow graph data not found,
loading blank flow graph.')
fg_n = {}
- blocks_n = Utils.listify(fg_n, 'block')
- connections_n = Utils.listify(fg_n, 'connection')
+ blocks_n = utils.listify(fg_n, 'block')
+ connections_n = utils.listify(fg_n, 'connection')
#create option block
self._options_block = self.get_parent().get_new_block(self,
'options')
self._options_block.get_param('id').set_value('options')
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Param.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Param.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Param.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,13 +16,10 @@
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 grc.elements.Param
-#Flow graph block parameters.
-#And options for enum type paramater.
-from grc import Utils
-from grc.Utils import odict
-from grc.elements.Element import Element
+from ... import utils
+from ... utils import odict
+from Element import Element
class Option(Element):
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Platform.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Platform.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Platform.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,19 +16,17 @@
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 grc.elements.Platform
-#A Platform contains all blocks in platform.
import os
-from grc import ParseXML
-from grc import Utils
-from grc.elements.Element import Element as _Element
-from grc.elements.FlowGraph import FlowGraph as _FlowGraph
-from grc.elements.Connection import Connection as _Connection
-from grc.elements.Block import Block as _Block
-from grc.elements.Port import Port as _Port
-from grc.elements.Param import Param as _Param
-from grc.Constants import DATA_DIR
+from ... utils import ParseXML
+from ... import utils
+from Element import Element as _Element
+from FlowGraph import FlowGraph as _FlowGraph
+from Connection import Connection as _Connection
+from Block import Block as _Block
+from Port import Port as _Port
+from Param import Param as _Param
+from Constants import DATA_DIR
class Platform(_Element):
@@ -98,9 +96,9 @@
parent = '%s/%s'%(parent, cat_n['name'])
block_tree.add_block(parent)
#recursive call to load sub categories
- map(lambda c: load_category(c, parent),
Utils.listify(cat_n, 'cat'))
+ map(lambda c: load_category(c, parent),
utils.listify(cat_n, 'cat'))
#add blocks in this category
- for block_key in Utils.listify(cat_n, 'block'):
+ for block_key in utils.listify(cat_n, 'block'):
block_tree.add_block(parent,
self.get_block(block_key))
#load the block tree
f = self._block_tree
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Port.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Port.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/base/Port.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,11 +16,9 @@
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 grc.elements.Port
-#Flow graph block port (source or sink).
-from grc import Utils
-from grc.elements.Element import Element
+from ... import utils
+from Element import Element
class Port(Element):
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Block.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Block.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Block.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,14 +16,12 @@
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 grc.gui.elements.Block
-#The graphical signal block.
-from grc import Preferences
+from ... gui import Preferences
from Element import Element
import Utils
import Colors
-from grc.Constants import *
+from ... gui.Constants import BLOCK_FONT, BORDER_PROXIMITY_SENSITIVITY,
LABEL_PADDING_HEIGHT, PORT_HEIGHT, PORT_SEPARATION, LABEL_SEPARATION
import pygtk
pygtk.require('2.0')
import gtk
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Connection.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Connection.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Connection.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,13 +16,11 @@
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 grc.gui.elements.Connection
-#The graphical connection for input/output ports.
import Utils
from Element import Element
import Colors
-from grc.Constants import CONNECTOR_ARROW_BASE,CONNECTOR_ARROW_HEIGHT
+from ... gui.Constants import CONNECTOR_ARROW_BASE, CONNECTOR_ARROW_HEIGHT
class Connection(Element):
"""A graphical connection for ports."""
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Element.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Element.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Element.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,16 +16,13 @@
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 grc.gui.elements.Element
-#Base class for graphical elements such as:
-#signal blocks, input sockets, output sockets and connections.
import Colors
import pygtk
pygtk.require('2.0')
import gtk
import pango
-from grc.Constants import *
+from ... gui.Constants import POSSIBLE_ROTATIONS, CONNECTION_SELECT_SENSITIVITY
class Element(object):
"""
@@ -223,7 +220,7 @@
Set the rotation in degrees.
@param rotation the rotation"""
if rotation not in POSSIBLE_ROTATIONS:
- raise Exception('"%s" is not one of the possible
rotations: (%s)'%(rotation,POSSIBLE_ROTATIONS))
+ raise Exception('"%s" is not one of the possible
rotations: (%s)'%(rotation, POSSIBLE_ROTATIONS))
self.rotation = rotation
def update(self):
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/FlowGraph.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/FlowGraph.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/FlowGraph.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,18 +16,15 @@
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 grc.gui.elements.FlowGraph
-#A flow graph structure for storing signal blocks and their connections.
-from grc import Preferences
-from grc import Utils
-from grc.Constants import *
-from grc.Actions import *
+from ... gui import Preferences
+#from .. base.Constants import *
+#from ... gui.Actions import *
import Colors
import Utils
-from grc.gui.ParamsDialog import ParamsDialog
+from ... gui.ParamsDialog import ParamsDialog
from Element import Element
-from grc.elements import FlowGraph as _FlowGraph
+from .. base import FlowGraph as _FlowGraph
import pygtk
pygtk.require('2.0')
@@ -35,7 +32,7 @@
import random
import time
-from grc import Messages
+from ... gui import Messages
class FlowGraph(Element):
"""
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Param.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Param.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Param.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,17 +16,15 @@
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 grc.gui.elements.Param
-#GTK objects for handling input and the signal block parameter class.
-import Utils
+from ... import utils
from Element import Element
import pygtk
pygtk.require('2.0')
import gtk
import pango
import gobject
-from grc.Constants import *
+from ... gui.Constants import PARAM_LABEL_FONT
from os import path
######################################################################################################
@@ -147,7 +145,7 @@
if self.is_enum(): value = self.get_option_keys()[int(value)]
self.set_value(value)
#set the markup on the label, red for errors in corresponding
data type.
- name = '<span font_desc="%s">%s</span>'%(PARAM_LABEL_FONT,
Utils.xml_encode(self.get_name()))
+ name = '<span font_desc="%s">%s</span>'%(PARAM_LABEL_FONT,
utils.xml_encode(self.get_name()))
#special markups if param is involved in a callback
if hasattr(self.get_parent(), 'get_callbacks') and \
filter(lambda c: self.get_key() in c,
self.get_parent()._callbacks):
@@ -207,8 +205,8 @@
max_len = max(42 - len(self.get_name()), 3)
if len(dt_str) > max_len:
dt_str = dt_str[:max_len-3] + '...'
- return '<b>%s:</b>
%s'%(Utils.xml_encode(self.get_name()), Utils.xml_encode(dt_str))
- else: return '<span foreground="red"><b>%s:</b>
error</span>'%Utils.xml_encode(self.get_name())
+ return '<b>%s:</b>
%s'%(utils.xml_encode(self.get_name()), utils.xml_encode(dt_str))
+ else: return '<span foreground="red"><b>%s:</b>
error</span>'%utils.xml_encode(self.get_name())
def get_layout(self):
"""!
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Platform.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Platform.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Platform.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,8 +16,6 @@
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 grc.gui.elements.Platform
-#Graphical platform to turn an existing platform into a gui platform.
from FlowGraph import FlowGraph
from Connection import Connection
@@ -32,7 +30,7 @@
c1.__init__(self, *args, **kwargs)
c2.__init__(self, *args, **kwargs)
"""%name, locals())
- return locals()[name]
+ return locals()[name]
def Platform(platform):
#combine with gui class
@@ -44,8 +42,8 @@
('Sink', Port),
('Param', Param),
):
- old_value = getattr(platform, attr)
- c = conjoin_classes(attr, old_value, value)
+ old_value = getattr(platform, attr)
+ c = conjoin_classes(attr, old_value, value)
setattr(platform, attr, c)
return platform
-
+
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Port.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Port.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Port.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,11 +16,9 @@
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 grc.gui.elements.Port
-#The graphical input/output sockets of the signal block.
from Element import Element
-from grc.Constants import *
+from ... gui.Constants import PORT_HEIGHT, PORT_SEPARATION, PORT_WIDTH,
CONNECTOR_EXTENSION_INITIAL_LENGTH, CONNECTOR_EXTENSION_LENGTH
import Colors
import pygtk
pygtk.require('2.0')
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Utils.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Utils.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Utils.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -19,7 +19,7 @@
address@hidden grc.gui.elements.Utils
#Shared functions for flow graph elements.
-from grc.Constants import POSSIBLE_ROTATIONS
+from ... gui.Constants import POSSIBLE_ROTATIONS
def get_rotated_coordinate(coor, rotation):
"""!
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Block.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Block.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Block.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,12 +16,10 @@
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 grc_gnuradio.Block
-#Flow graph block.
-from grc.elements.Block import Block as _Block
-from grc import Utils
+from .. base.Block import Block as _Block
from utils import extract_docs
+from ... import utils
class Block(_Block):
@@ -38,11 +36,11 @@
@return block a new block
"""
#grab the data
- doc = Utils.exists_or_else(n, 'doc', '')
- imports = map(lambda i: i.strip(), Utils.listify(n, 'import'))
+ doc = utils.exists_or_else(n, 'doc', '')
+ imports = map(lambda i: i.strip(), utils.listify(n, 'import'))
make = n['make']
- checks = Utils.listify(n, 'check')
- callbacks = Utils.listify(n, 'callback')
+ checks = utils.listify(n, 'check')
+ callbacks = utils.listify(n, 'callback')
#build the block
_Block.__init__(
self,
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Connection.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Connection.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Connection.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,16 +16,11 @@
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 grc_gnuradio.Connection
-#Flow graph connection.
-#A connection exists between 2 ports.
-#One port must be input, one output.
-#The port decided whether it can have the connection.
-from grc.elements.Connection import Connection as _Connection
+from .. base.Connection import Connection as _Connection
class Connection(_Connection):
-
+
def validate(self):
"""
Validate the connections.
@@ -37,5 +32,4 @@
sink_vlen = self.get_sink().get_vlen()
try: assert(source_vlen == sink_vlen)
except AssertionError: self._add_error_message('Source vector
length "%s" does not match sink vector length "%s".'%(source_vlen, sink_vlen))
-
-
+
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/FlowGraph.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/FlowGraph.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/FlowGraph.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,11 +16,9 @@
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 grc_gnuradio.FlowGraph
-#Primative flow graph.
from utils import expr_utils
-from grc.elements.FlowGraph import FlowGraph as _FlowGraph
+from .. base.FlowGraph import FlowGraph as _FlowGraph
from Block import Block
from Connection import Connection
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Generator.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Generator.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Generator.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,8 +16,6 @@
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 grc_gnuradio.Generator
-#Create python based flow graphs.
import os
import subprocess
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Param.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Param.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Param.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,11 +16,9 @@
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 grc_gnuradio.Param
-#Flow graph block parameters.
from utils import expr_utils
-from grc.elements.Param import Param as _Param
+from .. base.Param import Param as _Param
import os
class Param(_Param):
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Platform.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Platform.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Platform.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,12 +16,10 @@
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 grc_gnuradio.Platform
-#Gnuradio python specific platform.
import os
-from grc.Constants import FLOW_GRAPH_FILE_EXTENSION
-from grc.elements.Platform import Platform as _Platform
+from .. base.Constants import FLOW_GRAPH_FILE_EXTENSION
+from .. base.Platform import Platform as _Platform
from FlowGraph import FlowGraph as _FlowGraph
from Connection import Connection as _Connection
from Block import Block as _Block
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Port.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Port.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Port.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,12 +16,10 @@
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 grc_gnuradio.Port
-#Flow graph block port (source or sink).
-from grc.elements.Port import Port as _Port
-from grc import Utils
-from grc.Constants import MAX_NUM_PORTS
+from .. base.Port import Port as _Port
+from ... import utils
+from ... gui.Constants import MAX_NUM_PORTS
class Port(_Port):
@@ -35,9 +33,9 @@
@param n the nested odict
@return a new port
"""
- vlen = Utils.exists_or_else(n, 'vlen', '1')
- nports = Utils.exists_or_else(n, 'nports', '')
- optional = Utils.exists_or_else(n, 'optional', '')
+ vlen = utils.exists_or_else(n, 'vlen', '1')
+ nports = utils.exists_or_else(n, 'nports', '')
+ optional = utils.exists_or_else(n, 'optional', '')
#build the port
_Port.__init__(
self,
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/utils/convert_hier.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/utils/convert_hier.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/utils/convert_hier.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,12 +16,10 @@
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 grc_gnuradio.utils.convert_hier
-#Utility functions to convert a grc hier block to an xml wrapper
-from grc_gnuradio.Constants import BLOCK_DTD
-from grc import ParseXML
-from grc.Utils import odict
+from .. Constants import BLOCK_DTD
+from .... utils import ParseXML
+from .... utils import odict
def convert_hier(flow_graph, python_file):
#extract info from the flow graph
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/utils/expr_utils.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/utils/expr_utils.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/utils/expr_utils.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,8 +16,6 @@
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 grc_gnuradio.utils.expr_utils
-#Utility functions to comprehend variable expressions.
import string
VAR_CHARS = string.letters + string.digits + '_'
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/utils/extract_docs.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/utils/extract_docs.py
2008-09-04 06:27:32 UTC (rev 9496)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/utils/extract_docs.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,10 +16,8 @@
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 grc_gnuradio.utils.extract_docs
-#Extract documentation from the gnuradio doxygen files.
-from grc_gnuradio.Constants import DOCS_DIR
+from .. Constants import DOCS_DIR
from lxml import etree
import os
Property changes on:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/utils
___________________________________________________________________
Name: svn:ignore
+ Makefile
Makefile.in
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/utils/ParseXML.py
===================================================================
--- gnuradio/branches/developers/jblum/grc_reorganize/grc/src/utils/ParseXML.py
2008-09-04 06:27:32 UTC (rev 9496)
+++ gnuradio/branches/developers/jblum/grc_reorganize/grc/src/utils/ParseXML.py
2008-09-04 06:36:40 UTC (rev 9497)
@@ -16,11 +16,9 @@
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 grc.gui.ParseXML
-#Parse xml files to nested data and vice-versa.
from lxml import etree
-from Utils import odict
+from .. utils import odict
XMLSyntaxError = etree.XMLSyntaxError
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9497 - in gnuradio/branches/developers/jblum/grc_reorganize/grc: data/platforms scripts src/gui src/platforms src/platforms/base src/platforms/gui src/platforms/python src/platforms/python/utils src/utils,
jblum <=