Skip to content

Instantly share code, notes, and snippets.

@p--q
Created December 31, 2016 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p--q/0bcb17507cbdbd04462d6a769d9a2aa7 to your computer and use it in GitHub Desktop.
Save p--q/0bcb17507cbdbd04462d6a769d9a2aa7 to your computer and use it in GitHub Desktop.
test.py
def HelloWorld_Writer():
import pydevd; pydevd.settrace()
doc = XSCRIPTCONTEXT.getDocument()
doc.getText().setString("Hello World!")
if __name__ == "__main__":
import unopy
XSCRIPTCONTEXT = unopy.connect()
if not XSCRIPTCONTEXT:
print("Failed to connect.")
import sys
sys.exit(0)
HelloWorld_Writer()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment