def urlify(path):
    return uno.systemPathToFileUrl(os.path.realpath(path))
desktop.loadComponentFromURL(urlify(tempfilename), '_blank', 0, ())
Loading a document on OpenOffice using an external Python program