Skip to content

Instantly share code, notes, and snippets.

@n-epifanov
Created February 27, 2018 09:26
Show Gist options
  • Save n-epifanov/a35ed52a4b04d6da5b867c6907c825f3 to your computer and use it in GitHub Desktop.
Save n-epifanov/a35ed52a4b04d6da5b867c6907c825f3 to your computer and use it in GitHub Desktop.
This piece of code is required to get uno running on vanilla LibreOffice 4.4 with Python 2.7. LibreOffice from Ubuntu repo has a patched uno package and doesn't require this bootstrap code.
# XXX: LibreOffice UNO bootstrap.
sys.path.append('/opt/libreofficedev4.4/program')
os.putenv('URE_BOOTSTRAP', 'vnd.sun.star.pathname:/opt/libreofficedev4.4/program/fundamentalrc')
import uno
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment