shoper 1.3.1

Creator: bradpython12

Last updated:

0 purchases

TODO
Add to Cart

Description:

shoper 1.3.1

shoper
Simple shell operator module for Python


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

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.

Related Products

More From This Creator