Skip to main content

Simple shell operator module

Project description

shoper

Simple shell operator module for Python

wercker status Upload Python Package

Installation

$ pip install -U shoper

Example

List directory contents with ls.

from shoper.shelloperator import ShellOperator

sh = ShellOperator()
sh.run('ls -l')

Write and sort random numbers.

from shoper.shelloperator import ShellOperator

sh = ShellOperator()
sh.run(
    args=[
        'echo ${RANDOM} | tee random0.txt',
        'echo ${RANDOM} | tee random1.txt',
        'echo ${RANDOM} | tee random2.txt'
    ],
    output_files_or_dirs=['random0.txt', 'random1.txt', 'random2.txt']
)
sh.run(
    args='sort random[012].txt | tee sorted.txt',
    input_files_or_dirs=['random0.txt', 'random1.txt', 'random2.txt'],
    output_files_or_dirs='sorted.txt'
)

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

shoper-1.3.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

shoper-1.3.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file shoper-1.3.1.tar.gz.

File metadata

  • Download URL: shoper-1.3.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for shoper-1.3.1.tar.gz
Algorithm Hash digest
SHA256 b5d67ffd048de92b083f3bd43bd4b0b26c089ddc67704ee9a3e683a895ebf852
MD5 c6a8d883bb1fd30107ab804f903f2fec
BLAKE2b-256 20f02220d26ee0bbd8056cfc83c910c742a1145b76aa4e576cc3cd2cfc9080fd

See more details on using hashes here.

File details

Details for the file shoper-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: shoper-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for shoper-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c4b6f5071ac9b5ee88ce45d53ee60b2ad52bdd61e495113bdb4b005b66997e2
MD5 5cf2dcc0ac2d4b88832064c4eabef580
BLAKE2b-256 bd0356e64f30bdc7cf3bdc92bac0737fd13131b817861c7e55aa4fd1aec03d9d

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