File: __init__.py

package info (click to toggle)
python-rxv 0.7.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,252 kB
  • sloc: xml: 23,024; python: 1,206; makefile: 5
file content (19 lines) | stat: -rw-r--r-- 538 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function

import logging

from . import ssdp
from .rxv import RXV

__all__ = ['RXV']

# disable default logging of warnings to stderr. If a consuming
# application sets up logging, it will work as expected.
logging.getLogger('rxv').addHandler(logging.NullHandler())


def find(timeout=1.5):
    """Find all Yamah receivers on local network using SSDP search."""
    return [RXV(**ri._asdict()) for ri in ssdp.discover(timeout=timeout)]