import sys,uno sys.path.append('/home/ondrejj/svn/temp') from posta2csv import header, ppp, get_filename, fill_sheet def PPP(*args): """creates a new writer document and inserts a table with some data""" ctx = uno.getComponentContext() #smgr = ctx.ServiceManager #desktop = smgr.createInstanceWithContext("com.sun.star.frame.Desktop",ctx) desktop = ctx.ServiceManager.createInstanceWithContext( "com.sun.star.frame.Desktop", ctx) # open a writer document model=desktop.getCurrentComponent() sheet = model.Sheets.getByIndex(0) fill_sheet(sheet,'/home/ondrejj/svn/temp/st2zx7cp.247') #fill_sheet(sheet, sys.stdin.readline().strip()) g_exportedScripts = PPP,