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 details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for only-0.0.24.tar.gz
Algorithm Hash digest
SHA256 a2fcd6a6d5e47284d44a74b1af53e34881c672d417ac61055b399b642baf77ff
MD5 0c8c60c6a48c7844ee7118519a022d74
BLAKE2b-256 2f279e3fefebc02f20250a7c563385a497fd4256ab0f335d002eba2f6b52f58f

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