Skip to main content

A Shell object

Project description

pyshell

A Shell class to exectue shell commands as object methods.

Install

pip install bpyshell

How to use

Import

from pyshell.core import *

Create a shell object

sh = Shell()

Call shell commands as object methods

print(sh.ls())
00_core.ipynb
autocomplete.png
bpyshell
bpyshell.egg-info
build
conda
CONTRIBUTING.md
dist
docker-compose.yml
docs
env
index.ipynb
LICENSE
Makefile
MANIFEST.in
manpage.png
pyshell
pyshell.egg-info
README.md
settings.ini
setup.py

Use the flags kwarg for single dash arguments

print(sh.ls('.giti*', flags='a'))
.gitignore

Use kwargs for double dash arguments

print(sh.du('.', max_depth=0))
361548	.

You can use tab to autocomplete:

autocomplete

If there is a man page, it becomes the method's docstring manpage

Limitations

Each command is executed as a different process.

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

bpyshell-0.0.6.tar.gz (9.3 kB view hashes)

Uploaded Source

Built Distribution

bpyshell-0.0.6-py3-none-any.whl (8.8 kB view hashes)

Uploaded Python 3

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