[Pythonmac-SIG] clickable Python OSX apps and os.getcwd()
Chris Barker
Chris.Barker at noaa.gov
Mon Jul 7 11:12:13 EDT 2003
bugs wrote:
> However, when you double click apps created by BuildApplet and
> Platypus, the initial working directory is / and not the dir from which
> it was launched.
What is the dir form which it was launched??? That is not a clearly
defined concept. The Icon that is being clicked on could b anywhere: in
the dock, an alias on the desktop, in /usr/local/bin, in /Applications.
etc.
> For programs developed under Linux and Windows, the
> initial working directory is often a starting point for navigating and
> locating things like parameter and data files. These programs will
> fail under OSX.
Actually, under Linux, when you start a program form the command line,
there is a clearly defined working directory. When you start a program
by clicking in a GUI (KDE, GNOME, whatever), $HOME is usually used as
the working directory.
> I'd like to see BuildApplet and Platypus set the current working
> directory to be the directory from which they are launched.
As this really isn't meaningful, I suggest $HOME. That would certainly
be better that "/"
I'm not sure what Windows does, I know it was a tradition in the past to
use the directory that the executable resides in for various config
files, etc, but now that windows is multi-user, is that still
recommended? In any case, on *nix (and therefore OS-X) even that
directory is not clearly defined.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the Pythonmac-SIG
mailing list