# Path: orangecontrib/spark/base/shared_spark_context.py
# class SharedSparkContext:
#     _sc = None
#     _hc = None
# 
#     @property
#     def sc(self):
#         return SharedSparkContext._sc
# 
#     @sc.setter
#     def sc(self, val):
#         SharedSparkContext._sc = val
# 
#     @property
#     def hc(self):
#         return SharedSparkContext._hc
# 
#     @hc.setter
#     def hc(self, val):
#         SharedSparkContext._hc = val


import code
import itertools
import keyword
import os
import sys
import unicodedata
from Orange.widgets import widget, gui
from Orange.widgets.settings import Setting
from Orange.widgets.utils import itemmodels
from PyQt4 import QtGui
from PyQt4.QtCore import Qt, QRegExp, QByteArray
from PyQt4.QtGui import (
    QTextCursor, QFont, QColor, QPalette, QListView, QSizePolicy, QAction,
    QMenu, QKeySequence, QSplitter, QToolButton, QItemSelectionModel,
    QFileDialog
)
from orangecontrib.spark.base.shared_spark_context import SharedSparkContext


__all__ = ["OWPythonScript"]


def text_format(foreground = Qt.black, weight = QFont.Normal):
    fmt = QtGui.QTextCharFormat()
    fmt.setForeground(QtGui.QBrush(foreground))
    fmt.setFontWeight(weight)
    return fmt


class PythonSyntaxHighlighter(QtGui.QSyntaxHighlighter):

# Path: orangecontrib/spark/base/shared_spark_context.py
# class SharedSparkContext:
#     _sc = None
#     _hc = None
# 
#     @property
#     def sc(self):
#         return SharedSparkContext._sc
# 
#     @sc.setter
#     def sc(self, val):
#         SharedSparkContext._sc = val
# 
#     @property
#     def hc(self):
#         return SharedSparkContext._hc
# 
#     @hc.setter
#     def hc(self, val):
#         SharedSparkContext._hc = val


# Path: trash/OLDpyspark_script_console.py
import code
import itertools
import keyword
import os
import sys
import unicodedata
from Orange.widgets import widget, gui
from Orange.widgets.settings import Setting
from Orange.widgets.utils import itemmodels
from PyQt4 import QtGui
from PyQt4.QtCore import Qt, QRegExp, QByteArray
from PyQt4.QtGui import (
    QTextCursor, QFont, QColor, QPalette, QListView, QSizePolicy, QAction,
    QMenu, QKeySequence, QSplitter, QToolButton, QItemSelectionModel,
    QFileDialog
)
from orangecontrib.spark.base.shared_spark_context import SharedSparkContext



__all__ = ["OWPythonScript"]


def text_format(foreground = Qt.black, weight = QFont.Normal):
    fmt = QtGui.QTextCharFormat()
    fmt.setForeground(QtGui.QBrush(foreground))
    fmt.setFontWeight(weight)
    return fmt


class PythonSyntaxHighlighter(QtGui.QSyntaxHighlighter):

    def __init__(self, parent = None):