Re: windows directory

2005-06-14 Thread Trent Mick
[Peter Hansen wrote] > Richard Lewis wrote: > > If you want to know where a particular directory is (on a Windows > > 'drive') you could use: > > > > for drive_label in ["C", "D"]: > > if "Program Files" in os.listdir(drive_label + ":/"): return > > drive_label > > This would cause troubl

Re: windows directory

2005-06-14 Thread Rune Strand
On XP at least you have the environment variable "ProgramFiles". You can fetch the path it holds through os.environ -- http://mail.python.org/mailman/listinfo/python-list

Re: windows directory

2005-06-14 Thread Peter Hansen
Richard Lewis wrote: > If you want to know where a particular directory is (on a Windows > 'drive') you could use: > > for drive_label in ["C", "D"]: > if "Program Files" in os.listdir(drive_label + ":/"): return > drive_label This would cause trouble in at least two cases that I've seen.

Re: windows directory

2005-06-14 Thread Richard Lewis
On Tue, 14 Jun 2005 15:32:02 +0800, "Austin" <[EMAIL PROTECTED]> said: > I would like to write a program which creates the folders in specific > directory. > For example, I want to create folder in Program Files. How do I know > which > is in C:\ or D:\ > Is there any function to get the active pat

RE: windows directory

2005-06-14 Thread Tim Golden
[Austin] | I would like to write a program which creates the folders in specific | directory. | For example, I want to create folder in Program Files. How do | I know which | is in C:\ or D:\ | Is there any function to get the active path? It's not quite clear what you mean. You seem to be asking

windows directory

2005-06-14 Thread Austin
I would like to write a program which creates the folders in specific directory. For example, I want to create folder in Program Files. How do I know which is in C:\ or D:\ Is there any function to get the active path? Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list