Current File : //usr/lib/python2.7/site-packages/serial/__init__.pyc |
�
-��Nc @ s� d Z d d l Z e j d k r. d d l Tnv d d l Z e j d k rV d d l TnN e j d k rr d d l Tn2 e j d k r� d d l Tn e d e j f � � d g Z
d
� Z d S( s 2.6i����Nt cli( t *t ntt posixt javas; Sorry: no implementation for your platform ('%s') availables serial.urlhandlerc O s d | k p | d } d | k r- | d =n t } y | j � } Wn t k
rV n� Xd | k r� | j d d � d } xo t D]K } d | | f } y t | � } Wn t k
r� q� Xt j | j } Pq� Wt d | f � � n t } | d | | � }
| |
_ | r|
j � n |
S( s� Get an instance of the Serial class, depending on port/url. The port is not
opened when the keyword parameter 'do_not_open' is true, by default it
is. All other parameters are directly passed to the __init__ method when
the port is instantiated.
The list of package names that is searched for protocol handlers is kept in
``protocol_handler_packages``.
e.g. we want to support a URL ``foobar://``. A module
``my_handlers.protocol_foobar`` is provided by the user. Then
``protocol_handler_packages.append("my_handlers")`` would extend the search
path so that ``serial_for_url("foobar://"))`` would work.
t do_not_opens ://i i s %s.protocol_%ss"