'-no-kqemu' option is no longer necessary to avoid a warning.
[libguestfs.git] / python / guestfs.py
index 2600ff2..3976610 100644 (file)
@@ -947,7 +947,9 @@ class GuestFS:
         The single parameter is an argv-style list of arguments.
         The first element is the name of the program to run.
         Subsequent elements are parameters. The list must be
-        non-empty (ie. must contain a program name).
+        non-empty (ie. must contain a program name). Note that
+        the command runs directly, and is *not* invoked via the
+        shell (see "g.sh").
         
         The return value is anything printed to *stdout* by the
         command.
@@ -977,6 +979,8 @@ class GuestFS:
         u"""This is the same as "g.command", but splits the result
         into a list of lines.
         
+        See also: "g.sh_lines"
+        
         This function returns a list of strings.
         
         Because of the message protocol, there is a transfer
@@ -1621,3 +1625,45 @@ class GuestFS:
         """
         return libguestfsmod.ntfs_3g_probe (self._o, rw, device)
 
+    def sh (self, command):
+        u"""This call runs a command from the guest filesystem via
+        the guest's "/bin/sh".
+        
+        This is like "g.command", but passes the command to:
+        
+        /bin/sh -c "command"
+        
+        Depending on the guest's shell, this usually results in
+        wildcards being expanded, shell expressions being
+        interpolated and so on.
+        
+        All the provisos about "g.command" apply to this call.
+        """
+        return libguestfsmod.sh (self._o, command)
+
+    def sh_lines (self, command):
+        u"""This is the same as "g.sh", but splits the result into a
+        list of lines.
+        
+        See also: "g.command_lines"
+        
+        This function returns a list of strings.
+        """
+        return libguestfsmod.sh_lines (self._o, command)
+
+    def glob_expand (self, pattern):
+        u"""This command searches for all the pathnames matching
+        "pattern" according to the wildcard expansion rules used
+        by the shell.
+        
+        If no paths match, then this returns an empty list
+        (note: not an error).
+        
+        It is just a wrapper around the C glob(3) function with
+        flags "GLOB_MARK|GLOB_BRACE". See that manual page for
+        more details.
+        
+        This function returns a list of strings.
+        """
+        return libguestfsmod.glob_expand (self._o, pattern)
+