Hi Mickey,
The following is working right for me:
1) On the guest machine (a windows XP) I ve got python 2.7 installed.
And I've got the following python script file
C:\Document and Settings\admin\Desktop\test.py
#### FILE CONTENT ####
import os
print "Current working directory is:", os.getcwd()
fd = open("test.txt", "w")
fd.write("hola mundo")
fd.close()
raw_input() #wait for a key so the windows is not closed
#### EOF ####
2) From pysphere I run the following
> vm.login_in_guest("admin", "secret")
> vm.start_process(r"c:\python27\python.exe", args=[r"c:\Documents and Settings\admin\desktop\test.py"])
That's working fine, however the script prints:
"Current working directory is: C:\windows\System32"
and the file test.txt is created on that directory too
So instead, I want to do this:
> vm.start_process(r"c:\python27\python.exe", args=["test.py"], cwd=r"c:\Documents and Settings\admin\desktop")
Which will print "c:\Documents and Settings\admin\desktop" as working
directory, and will place the test.txt file on that directory too
Hope that helps,
Regards,
Seba.