Example #1
0
    def __init__(self, *args, **kwargs):
        import prober
        """See the documentation for GsmModem.__init__ for details; this is a 
        wrapper function that attempts to find attached modems and then reconnects
        to an initialized modem."""

        if kwargs.get('verbose', False):
            proberargs = {'verbose': True}
        else:
            proberargs = {}

        try:
            del kwargs['verbose']
        except:
            pass

        ports = prober.probe(**proberargs)
        if len(ports) > 0:
            kwargs['port'] = ports[0][0]
            kwargs['baudrate'] = ports[0][1]
            super(AutoGsmModem, self).__init__(*args, **kwargs)
        else:
            raise GsmModemNotFound()
Example #2
0
    def __init__(self, *args, **kwargs):
        import prober
        """See the documentation for GsmModem.__init__ for details; this is a 
        wrapper function that attempts to find attached modems and then reconnects
        to an initialized modem."""

        if kwargs.get('verbose', False):
            proberargs = {'verbose': True}
        else:
            proberargs = {}

        try:
            del kwargs['verbose']
        except:
            pass

        ports = prober.probe(**proberargs)
        if len(ports) > 0:
            kwargs['port'] = ports[0][0]
            kwargs['baudrate'] = ports[0][1]
            super(AutoGsmModem, self).__init__(*args, **kwargs)
        else:
            raise GsmModemNotFound()
Example #3
0
# http://pypi.python.org/pypi?:action=list_classifiers
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: BSD License",
    "Operating System :: MacOS :: MacOS X",
    "Operating System :: POSIX :: BSD :: FreeBSD",
    "Operating System :: POSIX :: Linux",
    "Operating System :: POSIX :: SunOS/Solaris", "Operating System :: POSIX",
    "Operating System :: Unix", "Programming Language :: Python",
    "Programming Language :: Python :: 3", "Topic :: Utilities"
]
license = "http://creativecommons.org/licenses/BSD/"
keywords = "sysv ipc inter-process communication semaphore shared memory shm message queue"

prober.probe()

extension = distutools.Extension(
    "sysv_ipc",
    source_files,
    # extra_compile_args=['-E'],
    depends=[
        "common.c",
        "common.h",
        "memory.c",
        "memory.h",
        "mq.c",
        "mq.h",
        "semaphore.c",
        "semaphore.h",
        "sysv_ipc_module.c",
                "Operating System :: MacOS :: MacOS X",
                "Operating System :: POSIX :: BSD :: FreeBSD",
                "Operating System :: POSIX :: Linux",
                "Operating System :: POSIX :: SunOS/Solaris",
                "Operating System :: POSIX", 
                "Operating System :: Unix", 
                "Programming Language :: Python", 
                "Programming Language :: Python :: 2",
                "Programming Language :: Python :: 3",
                "Topic :: Utilities" ]
license = "http://creativecommons.org/licenses/BSD/"
keywords = "ipc inter-process communication semaphore shared memory shm message queue"

libraries = ['mman','pthread']

d = prober.probe()

# Linux & FreeBSD require linking against the realtime libs
# This causes an error on other platforms
if "REALTIME_LIB_IS_NEEDED" in d:
    libraries.append("rt")

ext_modules = [ duc.Extension("posix_ipc", 
                              source_files,
                              libraries=libraries,
                              depends = [ "posix_ipc_module.c", 
                                          "probe_results.h", 
                                        ],
#                            extra_compile_args=['-E']
                             )
              ]
Example #5
0
    "Intended Audience :: Developers",
    "License :: OSI Approved :: BSD License",
    "Operating System :: MacOS :: MacOS X",
    "Operating System :: POSIX :: BSD :: FreeBSD",
    "Operating System :: POSIX :: Linux",
    "Operating System :: POSIX :: SunOS/Solaris", "Operating System :: POSIX",
    "Operating System :: Unix", "Programming Language :: Python",
    "Programming Language :: Python :: 2",
    "Programming Language :: Python :: 3", "Topic :: Utilities"
]
license = "http://creativecommons.org/licenses/BSD/"
keywords = "ipc inter-process communication semaphore shared memory shm message queue"

libraries = []

d = prober.probe()

# Linux & FreeBSD require linking against the realtime libs
# This causes an error on other platforms
if "REALTIME_LIB_IS_NEEDED" in d:
    libraries.append("rt")

ext_modules = [
    distutools.Extension(
        "posix_ipc",
        source_files,
        libraries=libraries,
        depends=[
            "posix_ipc_module.c",
            "probe_results.h",
        ],
Example #6
0
    "License :: OSI Approved :: BSD License",
    "Operating System :: MacOS :: MacOS X",
    "Operating System :: POSIX :: BSD :: FreeBSD",
    "Operating System :: POSIX :: Linux",
    "Operating System :: POSIX :: SunOS/Solaris",
    "Operating System :: POSIX",
    "Operating System :: Unix",
    "Programming Language :: Python",
    "Programming Language :: Python :: 2",
    "Programming Language :: Python :: 3",
    "Topic :: Utilities",
]
license = "http://creativecommons.org/licenses/BSD/"
keywords = "ipc inter-process communication semaphore shared memory shm message queue"

prober.probe()

extension = duc.Extension(
    "sysv_ipc",
    source_files,
    #                         extra_compile_args=['-E']
    depends=[
        "common.c",
        "common.h",
        "memory.c",
        "memory.h",
        "mq.c",
        "mq.h",
        "probe_results.h",
        "semaphore.c",
        "semaphore.h",