示例#1
0
文件: gui_utils.py 项目: t20100/pyFAI
    sys.modules["PySide.uic"] = uic
    matplotlib.rcParams['backend.qt4'] = 'PySide'
    Qt_version = QtCore.__version_info__
else:
    try:
        from PyQt4 import QtGui, QtCore, uic, QtWebKit
        from PyQt4.QtCore import SIGNAL, pyqtSignal as Signal
    except ImportError:
        has_Qt = False

    from PyQt4.QtCore import QT_VERSION_STR
    from PyQt4.Qt import PYQT_VERSION_STR
    from sip import SIP_VERSION_STR
    Qt_version = tuple(int(i) for i in QT_VERSION_STR.split(".")[:3])
    SIP_version = tuple(int(i) for i in SIP_VERSION_STR.split(".")[:3])
    PyQt_version = tuple(int(i) for i in PYQT_VERSION_STR.split(".")[:3])

if has_Qt:
    matplotlib.rcParams['backend'] = 'Qt4Agg'
    import matplotlib.pyplot
    matplotlib.pyplot.switch_backend('Qt4Agg')
    # Dear reader, I apologize for something that ugly !
    # Any cleaner version would be appreciated

    # matplotlib.use('Qt4Agg')
    from matplotlib.backends import backend_qt4 as backend
    from matplotlib import pyplot
    from matplotlib import pylab
else:
    from matplotlib import pyplot
    from matplotlib import pylab
示例#2
0
    sys.modules["PySide.uic"] = uic
    matplotlib.rcParams['backend.qt4'] = 'PySide'
    Qt_version = QtCore.__version_info__
else:
    try:
        from PyQt4 import QtGui, QtCore, uic, QtWebKit
        from PyQt4.QtCore import SIGNAL, pyqtSignal as Signal
    except ImportError:
        has_Qt = False
    else:
        from PyQt4.QtCore import QT_VERSION_STR
        from PyQt4.Qt import PYQT_VERSION_STR
        from sip import SIP_VERSION_STR
        Qt_version = tuple(int(i) for i in QT_VERSION_STR.split(".")[:3])
        SIP_version = tuple(int(i) for i in SIP_VERSION_STR.split(".")[:3])
        PyQt_version = tuple(int(i) for i in PYQT_VERSION_STR.split(".")[:3])

if has_Qt:
    matplotlib.rcParams['backend'] = 'Qt4Agg'
    import matplotlib.pyplot
    matplotlib.pyplot.switch_backend('Qt4Agg')
    # Dear reader, I apologize for something that ugly !
    # Any cleaner version would be appreciated

    # matplotlib.use('Qt4Agg')
    from matplotlib.backends import backend_qt4 as backend
    from matplotlib import pyplot
    from matplotlib import pylab
else:
    from matplotlib import pyplot
    from matplotlib import pylab
示例#3
0
文件: setup.py 项目: ckaus/EpiPy
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup, find_packages
from epipy import __version__, __author__, __author_email__, \
    __maintainer__, __maintainer_email__, __description__

try:
    from PyQt4.Qt import PYQT_VERSION_STR

    if int(PYQT_VERSION_STR.replace('.', '')) < 486:
        raise ImportError('''Expect PyQt4 4.8.6 or higher''')

except ImportError as error:
    raise ImportError(error)
    exit()

with open('requirements.txt') as f:
    requirements = f.readlines()

setup(
    name='epipy',
    version=__version__,
    author=__author__,
    author_email=__author_email__,
    maintainer=__maintainer__,
    maintainer_email=__maintainer_email__,
    description=__description__,
    long_description='''This tool is developed for the course Softwareprojekt
 Mobilkommunikation at the Freie Universität Berlin.
 .
示例#4
0
文件: setup.py 项目: ckaus/EpiPy
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup, find_packages
from epipy import __version__, __author__, __author_email__, \
    __maintainer__, __maintainer_email__, __description__

try:
    from PyQt4.Qt import PYQT_VERSION_STR

    if int(PYQT_VERSION_STR.replace('.', '')) < 486:
        raise ImportError('''Expect PyQt4 4.8.6 or higher''')

except ImportError as error:
    raise ImportError(error)
    exit()

with open('requirements.txt') as f:
    requirements = f.readlines()

setup(
    name='epipy',
    version=__version__,
    author=__author__,
    author_email=__author_email__,
    maintainer=__maintainer__,
    maintainer_email=__maintainer_email__,
    description=__description__,
    long_description='''This tool is developed for the course Softwareprojekt
 Mobilkommunikation at the Freie Universität Berlin.
 .