コード例 #1
0
ファイル: init_scripter.py プロジェクト: moceap/scribus
except ImportError:
    print >> sys.stderr, "Python cannot find the Qt4 bindings."
    print >> sys.stderr, "Please make sure, that the needed packages are installed."
    print >> sys.stderr, "On Ubuntu and Debian(-like) distribubutions you have to install python-qt4"
    raise
try:
    from PyQt4 import QtScript
except ImportError, e:
    print >> sys.stderr, "You seem to have Qt4 bindings without QtScript support."
    print >> sys.stderr, "This is currently a requirement."
    print >> sys.stderr, "Please make sure you have also libqt4-script installed."
    raise

# Shows nice looking error dialog if an unhandled exception occures.
import excepthook
excepthook.install()

# Make sure PyQt is new enough
if float(PYQT_VERSION_STR[:3]) < 4.4:
    print >> sys.stderr, "Your installed PyQt4 is older than version 4.4"
    print >> sys.stderr, "A newer version is needed. Please upgrade your packages."
    raise ImportError, "PyQt4 not new enough"

# Import helper modules
from scripter_hooks import MenuHooks
from mikro import create_pyqt_object, Error as MiKroError

# Scripter and i18n should be available everywhere globally
import __builtin__
__builtin__.Scripter = create_pyqt_object(qApp).Scripter
Scripter.qt.setParent(None)
コード例 #2
0
ファイル: init_scripter.py プロジェクト: moceap/scribus
except ImportError:
    print >> sys.stderr, "Python cannot find the Qt4 bindings."
    print >> sys.stderr, "Please make sure, that the needed packages are installed."
    print >> sys.stderr, "On Ubuntu and Debian(-like) distribubutions you have to install python-qt4"
    raise
try:
    from PyQt4 import QtScript
except ImportError, e:
    print >> sys.stderr, "You seem to have Qt4 bindings without QtScript support."
    print >> sys.stderr, "This is currently a requirement."
    print >> sys.stderr, "Please make sure you have also libqt4-script installed."
    raise

# Shows nice looking error dialog if an unhandled exception occures.
import excepthook
excepthook.install()


# Make sure PyQt is new enough
if float(PYQT_VERSION_STR[:3]) < 4.4:
    print >> sys.stderr, "Your installed PyQt4 is older than version 4.4"
    print >> sys.stderr, "A newer version is needed. Please upgrade your packages."
    raise ImportError, "PyQt4 not new enough"

# Import helper modules
from scripter_hooks import MenuHooks
from mikro import create_pyqt_object, Error as MiKroError


# Scripter and i18n should be available everywhere globally
import __builtin__