1*cdf0e10cSrcweir# HelloWorld python script for the scripting framework 2*cdf0e10cSrcweir 3*cdf0e10cSrcweirdef HelloWorldPython( ): 4*cdf0e10cSrcweir """Prints the string 'Hello World(in Python)' into the current document""" 5*cdf0e10cSrcweir#get the doc from the scripting context which is made available to all scripts 6*cdf0e10cSrcweir model = XSCRIPTCONTEXT.getDocument() 7*cdf0e10cSrcweir#get the XText interface 8*cdf0e10cSrcweir text = model.Text 9*cdf0e10cSrcweir#create an XTextRange at the end of the document 10*cdf0e10cSrcweir tRange = text.End 11*cdf0e10cSrcweir#and set the string 12*cdf0e10cSrcweir tRange.String = "Hello World (in Python)" 13*cdf0e10cSrcweir return None 14