If you know what the permissions are going to be then you can use umask to set the default file creation permissions to match. Then any files created in that directory will have the correct permissions.
I think the "pythonic" way to solve this problem would be to code up your own module which handles all the dirty parts in the background. It would create the new file, stat the original, and chmod/chown the new file as needed to match the original. All you would have to do after creating the module is pass the new function the original and new file information. -- Kevin Kelley On 4/12/07, Paulo da Silva <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] escreveu: > On Apr 12, 5:19 pm, [EMAIL PROTECTED] wrote: >> On Apr 12, 4:09 pm, Paulo da Silva <[EMAIL PROTECTED]> wrote: >> ... > > After poking around a bit I also discovered the > shutil module. It looks like you can use > shutil.copy2. More Pythonic, yes? > I have seen that in the index but I thought it was a different thing because it was referenced as "high-level operations". Anyway that helps but I still need to copy the whole file or to use stat and chown for the user/group ids. -- http://mail.python.org/mailman/listinfo/python-list
-- http://mail.python.org/mailman/listinfo/python-list