[Pythonmac-SIG] mac.chdir ?
Just van Rossum
Tue, 27 Oct 1998 18:19:36 +0100
At 11:56 AM -0500 10/27/98, Steven D. Majewski wrote:
>I would love it if we could find a place in the standard library
>for a function that does the following one liner:
>os.chdir( macfs.GetDirectory().as_pathname() )
>Only problem: I don't know where it should go. macfs seems the
>logical place, however, it's a builtin, not a .py file module.
>Alternatively: maybe a better way of linking the "current directory"
>returned by os.getcwd() and used by other Python file functions with
>the "magic" placeholder use by the Mac standard file dialogs.
>( If there's any interest in the latter solution, I'll look up
> what we changed in XlispStat to make it track better. However,
> that only works if the Mac Control Panel is set to "Take me to
> folder set by the application" )
There is function in macfs that was planned to do what you want, it's
called SetFolder(). Bad thing is: it doesn't work anymore. It used to be
had to fiddle with LMSetCurDirStore and friends but now Apple reccommends
to do it with a filter function in CustomGetFile(), which is kind of a pain
from a Python perspective. I don't know what we should do, but I'd love to
see that functionality as well.