> > This is really a Windows question, not a Python question. You should > have been able to figure it out yourself by examining existing > environment variables.
I agree, you're right. I learn more by figuring out the code myself. After Google briefly: In a DOS box type: SET This was too easy - sorry. > Something like the code below should work for you if the standard > environment variables haven't been hosed. > ---------- > import os > Filename = os.getenv("HOMEDRIVE") + os.getenv("HOMEPATH") + "\\Desktop > \MyNewFile" > f = file(Filename, "w") > f.write("Here's a file on the desktop\n") > f.close() -- http://mail.python.org/mailman/listinfo/python-list