Example #1
0
def asciiview(args):
    from diarc import parser
    from ascii_view import ascii_view
    from diarc import base_adapter
    topology = parser.parseFile(args[0])
    view = ascii_view.AsciiView()
    adapter = base_adapter.BaseAdapter(topology, view)
    adapter._update_view()
Example #2
0
def asciiview(args):
    from diarc import parser
    from ascii_view import ascii_view
    from diarc import base_adapter
    topology = parser.parseFile(args[0])
    view = ascii_view.AsciiView()
    adapter = base_adapter.BaseAdapter(topology, view)
    adapter._update_view()
Example #3
0
File: run.py Project: viccro/diarc
def asciiview(args=None):
    '''Creates a standard diarc topology and displays it in ascii'''
    from diarc import parser
    from ascii_view import ascii_view
    from diarc import base_adapter
    topology = parser.parseFile(args[0])
    view = ascii_view.AsciiView()
    adapter = base_adapter.BaseAdapter(topology, view)
    adapter._update_view()
Example #4
0
def qtview(args):
    try:
        import python_qt_binding.QtGui
    except:
        print "Error: python_qt_binding not installed."
        print "Please install using `sudo pip install python_qt_binding`"
        exit(-1)
    from diarc import parser
    from qt_view import qt_view
    from diarc import base_adapter
    topology = parser.parseFile(args[0])
    app = python_qt_binding.QtGui.QApplication(sys.argv)
    view = qt_view.QtView()
    adapter = base_adapter.BaseAdapter(topology, view)
    adapter._update_view()
    view.activateWindow()
    view.raise_()
    sys.exit(app.exec_())
Example #5
0
def qtview(args):
    try:
        import python_qt_binding.QtGui
    except:
        print "Error: python_qt_binding not installed."
        print "Please install using `sudo pip install python_qt_binding`"
        exit(-1)
    from diarc import parser
    from qt_view import qt_view
    from diarc import base_adapter
    topology = parser.parseFile(args[0])
    app = python_qt_binding.QtGui.QApplication(sys.argv)
    view = qt_view.QtView()
    adapter = base_adapter.BaseAdapter(topology, view)
    adapter._update_view()
    view.activateWindow()
    view.raise_()
    sys.exit(app.exec_())
Example #6
0
File: run.py Project: viccro/diarc
def qtview(args=None):
    '''Creates a standard diarc topology and displays it in QT'''
    try:
        import python_qt_binding.QtGui
    except Exception as exception:
        print "Error: python_qt_binding not installed."
        print "Please install using `sudo pip install python_qt_binding`"
        print str(exception)
        exit(-1)
    from diarc import parser
    from qt_view import qt_view
    from diarc import base_adapter
    topology = parser.parseFile(args[0])
    app = python_qt_binding.QtGui.QApplication(sys.argv)
    view = qt_view.QtView()
    adapter = base_adapter.BaseAdapter(topology, view)
    adapter._update_view()
    view.activateWindow()
    view.raise_()
    sys.exit(app.exec_())