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
_______________________________________________
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]