The os module has this ability:<br><a href="http://docs.python.org/lib/os-file-dir.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://docs.python.org/lib/os-file-dir.html</a><br><br>--<br><span class="sg">
Kevin Kelley</span><br><br><div><span class="gmail_quote">On 4/12/07, <b class="gmail_sendername">Paulo da Silva</b> <<a href="mailto:psdasilvaX@esotericax.ptx">psdasilvaX@esotericax.ptx</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi!<br><br>I need to process a file to produce another file that *must* have<br>*exactly* the same attributes and permissions of the former. What is the<br>best way to do this? The file must not exist with contents (it may exist
<br>empty) unless it has the same attributes and permissions.<br>I know how to do this using, let me call it, "C type code" (stat, chmod,<br>chown, etc). I would like to hear some opinions on if and how it would
<br>be possible in a more elegant/python way.<br><br>Thanks.<br>Paulo<br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br>