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.26.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file only-0.0.26.tar.gz.

File metadata

  • Download URL: only-0.0.26.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for only-0.0.26.tar.gz
Algorithm Hash digest
SHA256 48de876a40b0d6e937f7208b68400b5f2009ca85e22ad84b731bd670dc724856
MD5 96fcc5498639c1f4e735b34f1b03c70a
BLAKE2b-256 6d558635b55b80a30eaba843b8e93ff7bde1cb3d7df70b17e2c500bad3daeee1

See more details on using hashes here.

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