Re: What is a shortcut to the Default home directory in Windows

2008-01-19 Thread Christian Heimes
Tim Golden wrote: > Umm... Is it not? The only thing I'm aware of doing is > retaining backwards compat. by using SHGetPathFromIDList > on the SHGetSpecialFolderLocation because I was writing against > Win9x at the time. Or are you saying something else? > > (Admit I haven't checked all the docs s

Re: What is a shortcut to the Default home directory in Windows

2008-01-18 Thread Tim Golden
Christian Heimes wrote: > Mike Driscoll wrote: >> I personally use Tim Golden's excellent win32 API wrapper, the >> winshell script. You can find it here: >> >> http://timgolden.me.uk/python/winshell.html > > Yeah. Tim's winshell is fine but it's not using the official win32 api. Umm... Is it not

Re: What is a shortcut to the Default home directory in Windows

2008-01-18 Thread Christian Heimes
Mike Driscoll wrote: > I personally use Tim Golden's excellent win32 API wrapper, the > winshell script. You can find it here: > > http://timgolden.me.uk/python/winshell.html Yeah. Tim's winshell is fine but it's not using the official win32 api. However Python 2.6 will get an easier way to get a

Re: What is a shortcut to the Default home directory in Windows

2008-01-18 Thread Mike Driscoll
On Jan 18, 2:19 pm, Daniel Folkes <[EMAIL PROTECTED]> wrote: > I am trying to write a file to the users file system. > > I need it to be in there home directory in WINDOWS. I know there is a > "shortcut" to home in Linux("~"), but is there an equivalent to

Re: What is a shortcut to the Default home directory in Windows

2008-01-18 Thread Jerry Hill
On Jan 18, 2008 3:19 PM, Daniel Folkes <[EMAIL PROTECTED]> wrote: > I am trying to write a file to the users file system. > > I need it to be in there home directory in WINDOWS. I know there is a > "shortcut" to home in Linux("~"), but is there an equivale

Re: What is a shortcut to the Default home directory in Windows

2008-01-18 Thread Christian Heimes
Daniel Folkes wrote: > I am trying to write a file to the users file system. > > I need it to be in there home directory in WINDOWS. I know there is a > "shortcut" to home in Linux("~"), but is there an equivalent to that > in windows. Or to get to their

What is a shortcut to the Default home directory in Windows

2008-01-18 Thread Daniel Folkes
I am trying to write a file to the users file system. I need it to be in there home directory in WINDOWS. I know there is a "shortcut" to home in Linux("~"), but is there an equivalent to that in windows. Or to get to their "Documents and Settings" directory?

Re: Is it possible to set the date/time of a directory in windows with Python? If so how?

2006-05-13 Thread ToddLMorgan
Thanks very much for that roger :-) I changed my code to filehandle = win32file.CreateFile(file, win32file.GENERIC_WRITE, win32file.FILE_SHARE_WRITE, None, win32con.OPEN_ALWAYS, win32con.FILE_FLAG_BACKUP_SEMANTICS, None) nowWin32=pywintypes.Time(theTime)

Re: Is it possible to set the date/time of a directory in windows with Python? If so how?

2006-05-13 Thread Roger Upole
"ToddLMorgan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm trying to set any of the dates (create, modification, access) of a > directory under windows with python. > > I'm trying to do this as I'm trying to write a unittest for a directory > cleaning script I'm writing (ie I n

Is it possible to set the date/time of a directory in windows with Python? If so how?

2006-05-13 Thread ToddLMorgan
I'm trying to set any of the dates (create, modification, access) of a directory under windows with python. I'm trying to do this as I'm trying to write a unittest for a directory cleaning script I'm writing (ie I need the test to set the create/mod time for some of the directories so that I can b

Re: Directory in Windows

2005-04-30 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, custard_pie wrote: > Here's my code > > filelist={} > def listFiles(self, dirName, filesInDir): > for fname in filesInDir: > if os.path.isfile(fname): `fname` contains just the file name without t

Re: Directory in Windows

2005-04-30 Thread custard_pie
Here's my code filelist={} def listFiles(self, dirName, filesInDir): for fname in filesInDir: if os.path.isfile(fname): key = os.path.join(dirName, fname) stats = os.stat

Re: Directory in Windows

2005-04-30 Thread Kent Johnson
custard_pie wrote: Hi,..I tried to list files in a tree directory using os.path.walk. To avoid dirnames fromm being listed i use the os.path.isdir method. However, when isdir encounters directories that use spaces in their name e.q My Documents it doesn;t recognize them as directories.. Is there an

Directory in Windows

2005-04-30 Thread custard_pie
Hi,..I tried to list files in a tree directory using os.path.walk. To avoid dirnames fromm being listed i use the os.path.isdir method. However, when isdir encounters directories that use spaces in their name e.q My Documents it doesn;t recognize them as directories.. Is there any solution to this,