Re: TypeError while checking for permissions with os.access() on windows xp

2009-08-22 Thread ryniek90
First, some nitpicking: Include the whole traceback when posting about errors please. Don't write if some_boolean_expression != True: instead prefer if not some_boolean_expression:. Also, in your code except (Except), ex: return ex the parentheses are redundant, there's no Except Exception

Re: TypeError while checking for permissions with os.access() on windows xp

2009-08-22 Thread Dave Angel
ryniek90 wrote: div class=moz-text-flowed style=font-family: -moz-fixed First, some nitpicking: Include the whole traceback when posting about errors please. Don't write if some_boolean_expression != True: instead prefer if not some_boolean_expression:. Also, in your code except (Except), ex:

Re: TypeError while checking for permissions with os.access() on windows xp

2009-08-22 Thread ryniek90
First, some nitpicking: Include the whole traceback when posting about errors please. Don't write if some_boolean_expression != True: instead prefer if not some_boolean_expression:. Also, in your code except (Except), ex: return ex the parentheses are redundant, there's no Except Exception

Re: TypeError while checking for permissions with os.access() on windows xp

2009-08-22 Thread Stephen Hansen
WTF?? Why on IDLE it works, but when i run this script in cmd.exe, the os.getenv('HOME') goes NoneType? I'm to newbie yet to understand this :/ HOME is simply not a standard environment variable that Windows provides. Any program can set/add environment variables as it deems fit; in this

Re: TypeError while checking for permissions with os.access() on windows xp

2009-08-22 Thread ryniek90
WTF?? Why on IDLE it works, but when i run this script in cmd.exe, the os.getenv('HOME') goes NoneType? I'm to newbie yet to understand this :/ HOME is simply not a standard environment variable that Windows provides. Any program can set/add environment variables as it

TypeError while checking for permissions with os.access() on windows xp

2009-08-21 Thread ryniek90
I've got some code that checks priviliges on two paths: First - chosen by user Second - hardcoded home directory represented by **os.getenv('HOME')** - (os.getenv('HOME') works both on Linux and Windows) Here's the code: def __check_set_perm(self, rd_obj_path, backup_dest): try:

Re: TypeError while checking for permissions with os.access() on windows xp

2009-08-21 Thread Simon Forman
On Aug 21, 1:33 pm, ryniek90 rynie...@gmail.com wrote: I've got some code that checks priviliges on two paths: First - chosen by user Second - hardcoded home directory represented by **os.getenv('HOME')** - (os.getenv('HOME') works both on Linux and Windows) Here's the code: def