On Tuesday 04 August 2009 11:37:28 am Paul McNett wrote:
> Ed Leafe wrote:
> > On Aug 4, 2009, at 9:50 AM, John wrote:
> >> I'm trying to write some more example Dabo code to open and use
> >> openoffice's
> >> uno.py.   I know where my copy of uno.py happens to be.  So it's a
> >> simple
> >> task to add a pth file or add the path.  But I'm wondering how I can
> >> determine the location in a cross platform manner and also set the
> >> path in
> >> code.
> >
> > import sys
> > sys.path.append("/path/to/my/module")
>
> But, it is really up to the setup of the machine to make sure a module
> is importable. Your app shouldn't have to know *where* uno.py is, it
> should just be able to 'import uno' because uno has been properly
> installed in site-packages (or Ubuntu's dist-packages invention).
>
> Paul

Ok I think I understand.  However, OpenOffice is NOT following the python 
convention.  It places the uno.py file in 
the "/usr/lib/ooo3/basic3.1/programs" directory on my system and something 
different on windows.  I'm guessing, but  I bet ubuntu has the file in a 
different location.   And of course then there is OSx.

So I thought there some be some way to find the File.

Johnf




_______________________________________________
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