Пример #1
0
def unit_from_tango(unit):
    from taurus import deprecated
    deprecated(dep='unit_from_tango', rel='4.0.4', alt="pint's parse_units")

    if unit == PyTango.constants.UnitNotSpec:
        unit = None
    try:
        return UR.parse_units(unit)
    except (UndefinedUnitError, UnicodeDecodeError):
        # TODO: Maybe we could dynamically register the unit in the UR
        from taurus import warning
        warning('Unknown unit "%s (will be treated as unitless)"', unit)
        return UR.parse_units(None)
Пример #2
0
def qtdesigner_start(args, env=None):

    # Start Designer.
    designer_bin = get_qtdesigner_bin()

    designer = Qt.QProcess()
    designer.setProcessChannelMode(Qt.QProcess.ForwardedChannels)
    if isinstance(env, Qt.QProcessEnvironment):
        designer.setProcessEnvironment(env)
    else:  # obsolete call, only for bck-compat
        taurus.deprecated(dep='passing env which is not a QProcessEnvironment',
                          alt='QProcessEnvironment',
                          rel='4.5')
        designer.setEnvironment(env)
    designer.start(designer_bin, args)
    designer.waitForFinished(-1)

    return designer.exitCode()
Пример #3
0
def log_dependencies():
    """deprecated since '4.0.4'"""
    from taurus import deprecated
    deprecated(dep='taurus.log_dependencies', rel='4.0.4')