Logo Search packages:      
Sourcecode: eikazo version File versions  Download package

def Eikazo::Widgets::getDevice (   parent = None  ) 

Convenience function. 
    
    If no device is availabale, return 0
    If exactly one device is available, return a SaneDevice instance
       for this scanner
    If more devices are available, open a device selection dialog,
      and return a SaneDevie instance for the selected device, or
      None, it the user aborts the selection

Definition at line 182 of file Widgets.py.

00182                           :
    """ Convenience function. 
        
        If no device is availabale, return 0
        If exactly one device is available, return a SaneDevice instance
           for this scanner
        If more devices are available, open a device selection dialog,
          and return a SaneDevie instance for the selected device, or
          None, it the user aborts the selection
    """
    devs = sane.get_devices()
    l = len(devs)
    if not l:
        return 0
    if l == 1:
        return SaneDevice(devs[0][0])
    name = getDeviceName(parent)
    if name:
        return SaneDevice(name)
    return None

class SaneDevice(gobject.GObject):


Generated by  Doxygen 1.6.0   Back to index