[MMTK] running MMTK test script on windows XP
peter at maubp.freeserve.co.uk
Wed Mar 15 10:53:55 CET 2006
javier sacristan wrote:
> Recently Konrad kindly suggest me that one of the problems that I am
> having running MMTK on my windows machine is that “Apparently you are
> running the script with a current directory that is not the one in which
> the script resides.”
> I have pasted the error and Konrad’s answer as well.
> So if any Windows expert has any idea that would be welcomed.
Have you put your datafile 'argon.conf.gz' in the same directory as the
python test script?
If you run your script from the command line then simply change to this
directory and run 'python myexample.py' or something like that.
Depending on how you setup python, it may not be on the path, so you
might need to do 'c:\python23\python.exe argon.py' instead.
Within IDLE I'm not sure off hand how to change the working directory,
but would have a look at the 'os' library and 'os.path' for clues.
Try the following to see where you are:
Then use os.chdir to change the current directory.
Another easy answer is to use a fully specified filename:
conf_file = TextFile('c:\\python examples\\MMTK\\argon.conf.gz')
not just the following which assumes 'argon.conf.gz' is in the current
conf_file = TextFile('argon.conf.gz')
More information about the mmtk