> I have a script that converts data relating to my work. > It works great on my Linux system but some of my colleagues run windows. > I am attempting to convert the file paths to windows but am having no luck.
> I need to access 'memo.txt' in 'my documents' on windows & am struggling. > I have tried just about every combination of \ and / and \\ and // but > to no avail. > I need something like ... > C:\My Documents\memo.txt You'll have to come up with some windows-specific trick to find out the current user, because "my documents" is actually in c:\documents and settings\currentusername\my documents\ Try getting it from the HOMEPATH environment variable. import os print os.environ['HOMEPATH'] Alan _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor