Problem with Python on MAC OSX

Ronald Oussoren ronaldoussoren at mac.com
Wed Jun 30 04:11:22 EDT 2004


On 29-jun-04, at 9:33, edadk wrote:

> Hi
>
> I have problem with Python on MAC OSX. The following code documents it
>
> strib:~ eda$ pwd
> /home/eda
> strib:~ eda$ python
> Python 2.3 (#1, Sep 13 2003, 00:49:11)
> [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import os
>>>> print os.getcwd()
> /private/home/eda
>>>>
>
> Note I would have expected
>
> print os.getcwd()
>
> to print
>
> /home/eda
>
> Note that
>
>>>> os.system('echo $PWD')
> /home/eda
> 0
>
> Of course /home/eda is a symbolic link to /private/home/eda. Is this a
> bug or a feature? Is there a good way to work around it?

It's a normal Unix feature.

The thing that surprices me is that that your home directory is in 
/home in the first place. The standard location for home directories on 
OSX is /Users.

Ronald
--
X|support bv            http://www.xsupport.nl/
T:  +31 610271479       F:  +31 204416173





More information about the Python-list mailing list