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 "Documents and Settings" directory? > > Thanks in advance for the help.
os.path.expanduser("~") works on Windows, too. For application related data like config files please use os.environ["APPDATA"]. For all remaining shell folders like My Documents you *have* to use the win32 api. All shell folder names are localized and depend on the language version. Christian -- http://mail.python.org/mailman/listinfo/python-list