[Python-modules-commits] [python-spur] 04/04: Provide examples of how to use shell features
Ruben Undheim
rubund-guest at moszumanska.debian.org
Mon May 25 11:21:24 UTC 2015
This is an automated email from the git hooks/post-receive script.
rubund-guest pushed a commit to branch upstream
in repository python-spur.
commit d5efca04ff896ae08326e3dac19632534962a665
Author: Michael Williamson <mike at zwobble.org>
Date: Wed May 20 18:59:29 2015 +0100
Provide examples of how to use shell features
---
README.rst | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/README.rst b/README.rst
index 69594a5..2b784c6 100644
--- a/README.rst
+++ b/README.rst
@@ -323,3 +323,15 @@ and is especially well-suited to minimal shells found on embedded systems. If
the host shell is more fully-featured but only works with
``spur.ssh.ShellTypes.minimal``, feel free to submit an issue.
+Why don't shell features such as variables and redirection work?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Commands are run directly rather than through a shell.
+If you want to use any shell features such as variables and redirection,
+then you'll need to run those commands within an appropriate shell.
+For instance:
+
+.. code-block:: python
+
+ shell.run(["sh", "-c", "echo $PATH"])
+ shell.run(["sh", "-c", "ls | grep bananas"])
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-spur.git
More information about the Python-modules-commits
mailing list