A couple MacPython questions...

Skip Montanaro skip at mojam.com
Tue Dec 28 17:43:27 EST 1999


>>>>> "Jason" == Jason Harper <76703.4222 at CompuServe.COM> writes:

    Jason> 1. The Mac's Desktop isn't really expressible in terms of a
    Jason>    pathname - it's actually the union of the Desktop Folders on
    Jason>    all mounted volumes (and you can't count on that name, you
    Jason>    should use macfs.FindFolder() to get the proper, localized
    Jason>    name).  However, the code you posted should at least partially
    Jason>    work, and indeed it does on my system - I suspect that your
    Jason>    Desktop items are all on a different volume than 'Macintosh
    Jason>    HD:', or that you don't actually have any files or folders on
    Jason>    your desktop (disks, servers, and the Trash don't count).

Since I only have a single disk on my machine I sort of assume all desktop
items are on that volume.  Right now I see five regular files (in the Unix
sense), one folder and five alias that point to other files on the hard
drive laying about on my desktop.  That doesn't count the drive or Trash
icons.  I still see nothing when trying to list the contents of my desktop
folder:

    >>> os.chdir("Macintosh HD:Desktop Folder:")
    >>> os.listdir(os.getcwd())
    []

One thing that just occurred to me as a potential extra problem is that 
    Jason> 3. If the file you're trying to turn into an applet is big, you
    Jason>    may need to allocate more memory to BuildApplet - select it in
    Jason>    the Finder, then choose Get Info from the File menu.  The
    Jason>    default is less than 2MB.

Yes, this turned out to be the problem.  I definitely need a PostIt note for
this one...

    Jason> There is a MacPython mailing list at www.python.org that you
    Jason> might want to join for questions like these.

Hmmm... I don't see anything mentioned on the Mailing Lists page.  I do see
the pythonmac-sig list.  Perhaps it should be elevated to the status of a
plain old mailing list?

Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/
847-971-7098   | Python: Programming the way Guido indented...




More information about the Python-list mailing list