5 guestfs-python - How to use libguestfs from Python
10 g = guestfs.GuestFS ()
11 g.add_drive_opts ("disk.img", format="raw", readonly=1)
16 This manual page documents how to call libguestfs from the Python
17 programming language. This page just documents the differences from
18 the C API and gives some examples. If you are not familiar with using
19 libguestfs, you also need to read L<guestfs(3)>.
23 Errors from libguestfs functions are mapped into C<RuntimeException>
24 with a single string argument which is the error message.
26 =head2 MORE DOCUMENTATION
34 =head1 EXAMPLE 1: CREATE A DISK IMAGE
38 =head1 EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE
45 L<guestfs-examples(3)>,
49 L<http://libguestfs.org/>.
53 Richard W.M. Jones (C<rjones at redhat dot com>)
57 Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>
59 The examples in this manual page may be freely copied, modified and
60 distributed without any restrictions.
62 This library is free software; you can redistribute it and/or
63 modify it under the terms of the GNU Lesser General Public
64 License as published by the Free Software Foundation; either
65 version 2 of the License, or (at your option) any later version.
67 This library is distributed in the hope that it will be useful,
68 but WITHOUT ANY WARRANTY; without even the implied warranty of
69 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
70 Lesser General Public License for more details.
72 You should have received a copy of the GNU Lesser General Public
73 License along with this library; if not, write to the Free Software
74 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA