Skip to main content

@only.<OS> decorator. raise OSError if not supported OS

Project description

.. README generated with readmemako.py (github.com/russianidiot/readme-mako.py) and .README dotfiles (github.com/russianidiot-dotfiles/.README)
.. image:: https://img.shields.io/badge/Language-Python-blue.svg?style=plastic
:target: none
.. image:: https://img.shields.io/pypi/pyversions/only.svg
:target: https://pypi.org/pypi/only
.. image:: https://img.shields.io/pypi/v/only.svg
:target: https://pypi.org/pypi/only
|
.. image:: https://api.codacy.com/project/badge/Grade/fe6a6f03f9354ae391a907cdff85e47b
:target: https://www.codacy.com/app/russianidiot/only-py
.. image:: https://codeclimate.com/github/russianidiot/only.py/badges/gpa.svg
:target: https://codeclimate.com/github/russianidiot/only.py
.. image:: https://landscape.io/github/russianidiot/only.py/master/landscape.svg?style=flat
:target: https://landscape.io/github/russianidiot/only.py
.. image:: https://scrutinizer-ci.com/g/russianidiot/only.py/badges/quality-score.png?b=master
:target: https://scrutinizer-ci.com/g/russianidiot/only.py/
|
.. image:: https://scrutinizer-ci.com/g/russianidiot/only.py/badges/build.png?b=master
:target: https://scrutinizer-ci.com/g/russianidiot/only.py/
.. image:: https://semaphoreci.com/api/v1/russianidiot/only-py/branches/master/badge.svg
:target: https://semaphoreci.com/russianidiot/only-py
.. image:: https://api.travis-ci.org/russianidiot/only.py.svg?branch=master
:target: https://travis-ci.org/russianidiot/only.py/
.. image:: https://app.wercker.com/status/3f69156df6ce2aba0e766129e2f3e10a/s/master
:target: https://app.wercker.com/russianidiot/only.py
Install
```````
.. code:: bash
`[sudo] pip install only`
Usage
`````
.. code:: python
>>> import only
>>> @only.linux
>>> @only.osx
>>> @only.unix
>>> @only.windows
Examples
````````
.. code:: python
>>> @only.osx
>>> def osascript(): pass
>>> osascript() # raise OSError if not OS X
Feedback |github_follow| |github_issues|
.. |github_follow| image:: https://img.shields.io/github/followers/russianidiot.svg?style=social&label=Follow
:target: https://github.com/russianidiot
.. |github_issues| image:: https://img.shields.io/github/issues/russianidiot/only.py.svg
:target: https://github.com/russianidiot/only.py/issues

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

only-0.0.24.tar.gz (2.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page