#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php

# Copyright 2009 - Frank Scholz <coherence@beebits.net>
# Copyright 2014 - Hartmut Goebel <h.goebel@crazy-compilers.com>

"""
Inspector is a UPnP device inspector, or device spy

Based on the Coherence UPnP/DLNA framework
http://coherence.beebits.net
"""

import optparse

from upnp_inspector import __version__
from coherence import __version__ as coherence_version

parser = optparse.OptionParser(
    usage="%prog [-l]",
    version="%prog " + __version__ + " using Coherence " + coherence_version)
parser.add_option('-l', '--logfile',
                  help='Name of the logfile (defautl: none)')
options, args = parser.parse_args()
if args:
    parser.error("%prog does not take any positional argument")


from twisted.internet import gtk2reactor
gtk2reactor.install()
from twisted.internet import reactor

from upnp_inspector.base import Inspector

i = Inspector(logfile=options.logfile)
reactor.run()
