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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for only-0.0.27.tar.gz
Algorithm Hash digest
SHA256 c3c5b37b00da723283aa744ebd4a7f8c665e93855c55ad12f2210ee1e8d76a43
MD5 40c6618e9c3f1eeca057f2fc3c8216ec
BLAKE2b-256 c239684606bb8f38026a7f9413be9513f16491bee60d96eb5fb3def65becb9c8

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