Shortcut functions for shell scripting on Python 3.7+
Project description
#!/usr/bin/env python3.7
from shell_scripting import run, shell, shell_list
run("date | sed s/2018/2019/ > test.out")
print(shell("env | grep USER").stdout.split("\n"))
print(shell("cat /root/file"))
r = shell("cat /root/file")
print(
f"""\
args: {r.args}
returncode: {r.returncode}
stdout: {r.stdout}
stderr: {r.stderr}\
""",
end="",
)
for x in shell_list("env"):
print(x)
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
shell-scripting-0.0.1.tar.gz
(1.4 kB
view hashes)
Built Distribution
Close
Hashes for shell_scripting-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 190f3150c1003630c39b52047e6726f80c8d5bf965ac8023f4a489929fced722 |
|
MD5 | e3d2cb84558388f41c30d2a87ee0bc83 |
|
BLAKE2b-256 | 8509804d62a842d21e1039d3d674ee8ab9dfde300a76f1615d4caaa7e839e96a |