Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Tools for interacting with the shell

Project Description


CgkShell is a set of libraries for interacting with the shell. Currently it consists the following classes:


Opens a persistent Bash shell that allows running commands in sequence without losing the effects of the previous commands. E.g. you can issue a command that sets up some environment variables once, and then give control back to your Python application, allowing it to occasionally issue commands to this open shell.

Example usage:

(cgklibs)[14:32] nighty@saltmine CgkShell$ ipython --no-banner
WARNING: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv.

In [1]: from cgkshell import PersistentBash

In [2]: with PersistentBash.PersistentBash() as shell:
   ...:     shell.execute("export parrot='a stiff, bereft of life, it rests in peace'")
   ...:     import datetime
   ...:     print(
   ...:     out = shell.execute('export|grep parr')
   ...:     print('-----')
   ...:     print out
declare -x parrot="a stiff, bereft of life, it rests in peace"

In [3]: exit
(cgklibs)[14:34] nighty@saltmine CgkShell$


python clean build install


CgkShell is Copyright (c) 2016 Cegeka NV and released under the MIT license. See LICENSE.txt for details.


Release History

Release History

This version
History Node

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
CgkShell- (3.0 kB) Copy SHA256 Checksum SHA256 Source Feb 14, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting