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:

[...@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:

[...@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





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to