Re: PY: Python and setting permissions on windows?

Date : Fri, 03 Feb 2006 04:16:13 +0000
To : XSI(at)Softimage.COM
From : "brad" <brad(at)cg-soup.com>
Subject : Re: PY: Python and setting permissions on windows?
Hmmm, don't think I can do that. Whatever solution must be cross platform since our pieline includes Mac and linux.


>  -------Original Message-------
>  Hi Brad,
>  
>  I don't know for the native python, but you can also try pywin32:
>  win32file.CreateDirectoryW
>  You can look into pywin32.win32file documentation for more details.
>  
>  Cheers,
>  
>  Aloys
>  
>  
>  On 2/3/06, BRAD <[LINK: mailto:brad(at)cg-soup.com] brad(at)cg-soup.com> wrote:
>  Anybody working with Python on windows have experience manipulating
>  permissions for folders or files?
>  The docs I've found all say that stat.S_IREAD and stat.S_IWRITE should at
>  least work with windows, but I'm having no luck or no effect on
>  permissions for directories:
>  
>  # 1. Run this
>  import os, stat
>  path = "c:/PermissionTest"
>  os.makedirs(path, stat.S_IWRITE)
>  
>  # 2. Check if path exists, then run this
>  path = "c:/PermissionTest"
>  os.chmod(path,  stat.S_IREAD)
>  
>  
>  I get no errors, but then, no permissions are changed on the file either.
>  Any help in this department, or a link to the right reference would be
>  appreciated.
>  
>  -Brad
>  ---
>  Unsubscribe? Mail  [LINK: mailto:Majordomo(at)Softimage.COM]
>  Majordomo(at)Softimage.COM with the following text in body:
>  unsubscribe xsi
>  
>  
>  --
>  Aloys Baillet - XSI Technical Director
>  Character Dpt - Animal Logic
>  --
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.