[Tutor] python and mingw home directory problem

Peter Wig pwigginpy at yahoo.com
Wed Nov 1 00:48:59 CET 2006


Hi everyone,

I'm trying to run some commands with mingw from python.  However, somehow my home directory (for mingw) is being changed when I initialize tk.  Here's an example:

import os
from Tkinter import Tk
os.system("C:/msys/1.0/bin/sh.exe --login -i -c 'pwd'  ") # just print my home directory
root = Tk()
os.system("C:/msys/1.0/bin/sh.exe --login -i -c 'pwd'  ") # just print my home directory

^^^^^^^^^^^^^^^^^^^^^^^^^^^
output:
/home/Pete
/c/Documents and Settings/Pete


As you can see, initializing Tk has somehow changed my mingw home directory from "/home/Pete" to "/c/Documents and Settings/Pete".  Since "/home/Pete" has my login script, this is a major problem.

The actual change happens at _tkinter.create(.....) during Tk().

Any ideas?

Thanks,
Pete

 		
---------------------------------
Get your email and more, right on the  new Yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061031/40b75f45/attachment.htm 


More information about the Tutor mailing list