Exemplo n.º 1
0
def tree( path, indent = 0 ):
    raw = _OW.get( path )
    if raw:
        entries = raw.split( ',' )
        for entry in entries:
            print ' ' * indent, entry
            if entry[ -1 ] == '/':
                tree( entry, indent + 4 )
Exemplo n.º 2
0
def tree(path, indent=0):
    raw = _OW.get(path)
    if raw:
        entries = raw.split(',')
        for entry in entries:
            print ' ' * indent, entry
            if entry[-1] == '/':
                tree(entry, indent + 4)
Exemplo n.º 3
0
def _get(path):
    """
    Get the sensor data. In the case where a sensor is disconnected
    from the bus or something else goes wrong, raise exUnknownSensor.
    """
    sensor = _OW.get(path)
    if sensor == None:
        raise exUnknownSensor(path)
    return sensor
Exemplo n.º 4
0
def _get(path):
    """
    Get the sensor data. In the case where a sensor is disconnected
    from the bus or something else goes wrong, raise exUnknownSensor.
    """
    sensor = _OW.get(path)
    if sensor == None:
        raise exUnknownSensor(path)
    return sensor
Exemplo n.º 5
0
def log_get( path ):
    """
    Write the _OW.get call details out to the log file.
    """
    logfile.write( "_OW.get( '%s' )%s" % ( path, os.linesep ) )
    return _OW.get(path)
Exemplo n.º 6
0
def log_get( path ):
    """
    Write the _OW.get call details out to the log file.
    """
    logfile.write( "_OW.get( '%s' )%s" % ( path, os.linesep ) )
    return _OW.get(path)