formating a filesystem with python

Sean DiZazzo half.italian at gmail.com
Wed Sep 10 17:21:11 EDT 2008


On Sep 10, 1:57 pm, "Ricardo Tiago" <rti... at gmail.com> wrote:
> Hi all,
>
> is there a package in python that allows to mount/umount and format
> (to ext3) a filesystem? I know that this is possible by just calling
> the os commands 'mount/umount and mkfs' but this would imply to have
> to change sudoers to run the script as non-root.
>
> Thanks
> Ric

You can use pexpect to become root without changing sudoers.  Assuming
you know the root password...

~Sean



More information about the Python-list mailing list