
    T                     "    d Z ddlZd Zd Zd Zy)zImplements interface for talking to hid devices.

This module implenets an interface for talking to low level hid devices
using various methods on different platforms.
    Nc                      t        d      S )N	EnumerateInternalPlatformSwitch     -platform/bq/third_party/pyu2f/hid/__init__.pyr   r      s    		,,r   c                     t        d|       S )N__init__r   )paths    r	   Openr      s    	
D	11r   c                    d}t         j                  j                  d      rddlm} |j
                  }nct         j                  j                  d      rddlm} |j                  }n1t         j                  j                  d      rddlm} |j                  }|st        d	t         j                  z         | d
k(  r ||i |S  t        ||       |i |S )z=Determine, on a platform-specific basis, which module to use.Nlinuxr   )r   win32)windowsdarwin)macoszUnsupported platform: r   )sysplatform
startswith	pyu2f.hidr   LinuxHidDevicer   WindowsHidDevicer   MacOsHidDevice	Exceptiongetattr)funcnameargskwargsclzr   r   r   s          r	   r   r       s     	#\\W%


C
||w'!

"
"C
||x(


C	
,s||;
<<	h		0	00r   )__doc__r   r   r   r   r   r   r	   <module>r"      s    
 -21r   