Re: [dabo-users] will this work for a Mac?

Author: John

Posted: 2009-08-08 at 19:46:07

On Saturday 08 August 2009 03:50:44 pm Ed Leafe wrote:

> On Aug 8, 2009, at 5:35 PM, John wrote:

> > Doesn't a user have to have access to /usr/bin? If that is true

> > then reading

> > anything under /usr is possible - right?

>

> It depends on the usr and the directory. The code could barf if it

> hit a directory for which the user does not have read privs. I just

> tried it on my machine:

>

> [ed@Homer ~]$ find /usr -iname uno.py

> find: /usr/local/pgsql/data: Permission denied

> find: /usr/share/wikid/help/de.lproj/wiki: Permission denied

> find: /usr/share/wikid/help/en.lproj/wiki: Permission denied

> find: /usr/share/wikid/help/fr.lproj/wiki: Permission denied

> find: /usr/share/wikid/help/ja.lproj/wiki: Permission denied

>

> So it looks like it will hit some bumps. Oh, and there is no uno.py

> there. But if I look in the application bundle:

>

> [ed@Homer ~]$ find /Applications/NeoOffice.app -iname uno.py

> /Applications/NeoOffice.app/Contents/MacOS/uno.py

>

> > Works on Linux and windows (just change the starting location for

> > windows).

> > But I'm always open to better code. os.sep is much better - thanks.

> >

> > The problem with uno.py is it does not following standard python

> > practice. On

> > linux (ubuntu and openSUSE) uno.py is in "/usr/lib/ooo3/basis3.1/

> > program" and

> > there is no pth file created from the install of openoffice.

> > Windows is

> > similar. So I was hoping I could find the file and add the path to

> > PythonPath.

> >

> > I don't have a Mac but I was hoping to again to just find the file

> > (assuming

> > the openoffice install did not register the file). And again add the

> > location to the path. But it sounds like that will not work?

>

> Doesn't look like it. Mac apps are distributed in "bundles": a

> directory that appears in the OS as a single, double-clickable file,

> but which contains all dependencies.

>

>

> -- Ed Leafe

So I'll tell the reader that they'll have to find the file and somehow get it

to import? Can you import the file from a Dabo app?

Johnf

©2009 John