← Back to team overview

phatch-dev team mailing list archive

Re: desktop folder on mac os x

 

Guys

os.path.expanduser('~/Desktop') is the desktop on an English language Mac.

Even if I load the French Language Pack (to put the UI into French), I'd be amazed/shocked if it changed the name of 'Desktop'. However if you install the French version of the OS on a clean machine - it's possible that 'Desktop' is localized. I don't know. I'll ask on the MacOSXHints forum and let you know.

I'm not sure what you're trying to achieve here. Putting things on the desktop is messy - however it's a very common place to put things.

I've listed the common folders (Downloads, Library, Pictures) below.

If you're looking for a default place - Destkop seems fine. If folk complain, you can reconsider.

Robin
http://www.clanmills.com

506 /Users/rmills/temp> python
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.expanduser('~/Desktop')
'/Users/rmills/Desktop'
>>> quit()

507 /Users/rmills/temp> export | grep HOME
export HOME="/Users/rmills"
export MAGICK_HOME="/Users/rmills/bin/ImageMagick-6.3.5"

508 /Users/rmills/temp> cd ..
509 /Users/rmills> dirs
drwxr-xr-x 47 rmills rmills 1598 Jun 16 07:47 Downloads <--- // obvious drwx------ 10 rmills rmills 340 Jun 13 18:29 Desktop <--- // obvious drwx------ 31 rmills rmills 1054 Jan 25 19:40 Documents <--- // obvious drwx------ 47 rmills rmills 1598 Dec 23 00:02 Library <--- // alternative the the /Library directory (for user's private fonts and stuff) drwx------ 10 rmills rmills 340 Nov 9 2008 Pictures <--- // Used by iPhoto and some other folks drwx------ 4 rmills rmills 136 Jul 18 2008 Movies <--- // Used by iDVD and things drwxr-xr-x 6 rmills rmills 204 Mar 11 2008 Sites <--- // Used by apache for http://localhost/~rmills drwx------ 5 rmills rmills 170 Feb 1 2008 Music <--- // Used by iTunes

// I think there's sometimes an Applications directory (but I don't have it on either of my Machines)

510 /Users/rmills>






On Jun 18, 2009, at 14:21 PM, Stani wrote:

Hi Erich & Robin,
Is this also working on a not english Mac, e.g french, german, ...?

On Thu, Jun 18, 2009 at 10:16 PM, Erich Heine<sophacles@xxxxxxxxx> wrote:
I have a mac now also (yay work!) -- Your method is the correct way to access the Desktop folder. Perhaps tho phatch stuff goes in the Pictures
folder by default instead?
The pictures go where they are defined in the action list. I need the
desktop folder for specific cases where I really want to have the
desktop. For example to provide it as a variable <desktop> as a
shortcut for the user.

Stani

Robin, I presume you've been using Mac longer
than me, what do you think?

Regards,
Erich
On Thu, Jun 18, 2009 at 12:53 PM, Stani <spe.stani.be@xxxxxxxxx> wrote:

Hi Robin,

Do you know how to retrieve the desktop folder on a Mac. Now I use:
elif sys.platform.startswith('darwin'):
   # Mac: verify this!
   DESKTOP_FOLDER  = os.path.expanduser('~/Desktop')

This most likely not correct. Could you find a better solution?

Best regards,
Stani

--
Phatch Photo Batch Processor - http://photobatch.stani.be
SPE Python IDE - http://pythonide.stani.be

_______________________________________________
Mailing list: https://launchpad.net/~phatch-dev
Post to     : phatch-dev@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~phatch-dev
More help   : https://help.launchpad.net/ListHelp





--
Phatch Photo Batch Processor - http://photobatch.stani.be
SPE Python IDE - http://pythonide.stani.be

_______________________________________________
Mailing list: https://launchpad.net/~phatch-dev
Post to     : phatch-dev@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~phatch-dev
More help   : https://help.launchpad.net/ListHelp




References