diff options
author | noah <noah@656d521f-e311-0410-88e0-e7920216d269> | 2006-02-03 02:13:47 +0000 |
---|---|---|
committer | noah <noah@656d521f-e311-0410-88e0-e7920216d269> | 2006-02-03 02:13:47 +0000 |
commit | a172e2dbf3060964c603fdd43da618d39b8b0c8b (patch) | |
tree | c58ce0d33eac168289a704a8ea43462a6796fa29 /pexpect/psh.py | |
parent | 9d0a110d8aaecad3b12bbe043e7ad53d6baeabd1 (diff) | |
download | pexpect-a172e2dbf3060964c603fdd43da618d39b8b0c8b.tar.gz |
This is some experimental thing I was considering.
git-svn-id: http://pexpect.svn.sourceforge.net/svnroot/pexpect/trunk@349 656d521f-e311-0410-88e0-e7920216d269
Diffstat (limited to 'pexpect/psh.py')
-rw-r--r-- | pexpect/psh.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pexpect/psh.py b/pexpect/psh.py new file mode 100644 index 0000000..1d62521 --- /dev/null +++ b/pexpect/psh.py @@ -0,0 +1,24 @@ +"""This is a utility class to make shell scripting easier in Python. +It combines Pexpect and wraps many Standard Python Library functions. +The goal is to make Python an attractive alternative to Sh scripting. +""" +import pexpect, os, sys + +class psh (object): + def __init__ (self): + self.cwd = os.getcwd() + + def ls (self, path=''): + def cd (self, path='-'): + def rm (self, path=''): + def cp (self, path_from='', path_to=''): + def mv (self, path_from='', path_to=''): + def pwd (self): + def which (self, exe_name): + def chown (self, path, user='', group='', recurse=False): + def chmod (self, path, perms='', recurse=False): + def chattr (self, path, attrs='', recurse=False): + def cat (self, path): + def run (self, cmd): + def pipe (self, cmd, string_to_send): + |