Most examples in the devguide are in Java. How do I translate them to python code ?
Most sample code you find there is written in Java. It is easy to translate Java code to python,when you know the following differences: In python you don’t need queryInterface. E.g. Java code like oInterface = (XInterface) oMSF.createInstance( “com.sun.star.frame.Desktop” ); oCLoader = ( XComponentLoader ) UnoRuntime.queryInterface( XComponentLoader.class, oInterface ); PropertyValue [] szEmptyArgs = new PropertyValue [0]; aDoc = oCLoader.loadComponentFromURL( “private:factory/swriter” , “_blank”, 0, szEmptyArgs ); becomes in python simply oCLoader = oMSF.createInstance( “com.sun.star.frame.Desktop” ) aDoc = oCLoader.loadComponentFromURL( “private:factory/swriter”, “_blank”, 0, () ) You don’t need this intermediate oInterface variable anymore. So the python code simplifies the example a lot, with a little training, you shouldn’t have too many problems to translating Java to python code.