[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Select a File...
Ian Mallett wrote:
I don't know how to make code to make it go one directory
higher.
To do this for the actual current directory for the process,
import os
os.chdir(os.pardir)
But if you're implementing a graphical file chooser, you
probably don't want to change the cwd, but just keep track
of the path to the directory being browsed and add/remove
from it using os.path.join and os.path.split.
--
Greg