"Cloning" file attributes and permissions

Kevin Kelley wyldwolf at gmail.com
Thu Apr 12 12:48:15 EDT 2007


The os module has this ability:
http://docs.python.org/lib/os-file-dir.html

--
Kevin Kelley

On 4/12/07, Paulo da Silva <psdasilvaX at esotericax.ptx> wrote:
>
> Hi!
>
> I need to process a file to produce another file that *must* have
> *exactly* the same attributes and permissions of the former. What is the
> best way to do this? The file must not exist with contents (it may exist
> empty) unless it has the same attributes and permissions.
> I know how to do this using, let me call it, "C type code" (stat, chmod,
> chown, etc). I would like to hear some opinions on if and how it would
> be possible in a more elegant/python way.
>
> Thanks.
> Paulo
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070412/bb72cb58/attachment.html>


More information about the Python-list mailing list