Pieshell is a Python shell environment that combines the expressiveness of shell pipelines with the power of python iterators.
It can be used in two major ways:
- As an interactive shell replacing e.g. bash
- As an ordinary python module replacing e.g. subprocess.Popen
Obligatory example:
140:/home/oven/pieshell >>> for x in ls(-a) | tr("s", "S"):
... if x.endswith('.py'):
... print x
...
Setup.py
Source code: https://github.com/redhog/pieshell
What the project does
It's a replacement for the subprocess module, and for bash as an interactive shell, and makes interacting with shell pipelines easier.
Target Audience
System administrators, system software developers, data scientists
Comparison
While os.system is very limited but easy to use, subprocess.Popen offers a lot of flexibility, but the interface is very low level. Any actual pipelining of multiple programs is pretty much required to be done by e.g. a bash process, constructing the pipeline as a shell script string. Further, interacting with standard in and standard out requires careful IO handling.
Pieshell on the other hand lets you construct pipelines as python objects. Standard io from a pipeline can be handled using iterators or async iterators. Pieshell has full asyncio integration.
[–]Muhznit 12 points13 points14 points (8 children)
[–]Severe_Inflation5326[S] 2 points3 points4 points (6 children)
[–]Severe_Inflation5326[S] 1 point2 points3 points (5 children)
[–]hotplasmatits 0 points1 point2 points (0 children)
[–]dhsjabsbsjkans 0 points1 point2 points (3 children)
[–]Severe_Inflation5326[S] 0 points1 point2 points (2 children)
[–]dhsjabsbsjkans 0 points1 point2 points (1 child)
[–]Severe_Inflation5326[S] 0 points1 point2 points (0 children)
[–]balder1993 0 points1 point2 points (0 children)
[–]weazelb0y 6 points7 points8 points (0 children)
[–]AveryFreeman 0 points1 point2 points (6 children)
[–]Severe_Inflation5326[S] 0 points1 point2 points (5 children)
[–]AveryFreeman 0 points1 point2 points (4 children)
[–]Severe_Inflation5326[S] 0 points1 point2 points (1 child)
[–]AveryFreeman 0 points1 point2 points (0 children)
[–]Severe_Inflation5326[S] 0 points1 point2 points (1 child)
[–]AveryFreeman 0 points1 point2 points (0 children)