View conf.py
class conf:
def __init__(self):
config = configparser.SafeConfigParser()
config.read(path)
#~ pass
def w(self, path, section, option, value):
"""
http://www.programcreek.com/python/example/1033/ConfigParser.SafeConfigParser
Write the specified Section.Option to the config file specified by path.
Replace any previous value. If the path doesn't exist, create it.
View my.py
from com.sun.star.awt import Point
GetmyToolBarNames = ('private:resource/toolbar/addon_ULTIMUS_3.OfficeToolBar',
'private:resource/toolbar/addon_ULTIMUS_3.OfficeToolBar_ELENCO',
'private:resource/toolbar/addon_ULTIMUS_3.OfficeToolBar_ANALISI',
'private:resource/toolbar/addon_ULTIMUS_3.OfficeToolBar_COMPUTO',
'private:resource/toolbar/addon_ULTIMUS_3.OfficeToolBar_CONTABILITA',)
def toolbar_ordina (arg=None):
#~ https://www.openoffice.org/api/docs/common/ref/com/sun/star/ui/DockingArea.html
oDoc = XSCRIPTCONTEXT.getDocument()
oLayout = oDoc.CurrentController.getFrame().LayoutManager
View bak_timestamp.py
import uno, unohelper, pyuno, os, sys
from datetime import datetime, date, shutil
def bak_timestamp(arg=None):#debug(arg=None):#
'''
fa il backup del file di lavoro, partendo dall'ultimo salvataggio certo,
in una directory con nome "/percorso_file/leeno-bk/"
'''
tempo = ''.join(''.join(''.join(str(datetime.now()).split('.')[0].split(' ')).split('-')).split(':'))
oDoc = XSCRIPTCONTEXT.getDocument()
View bak.bas
FUNCTION gina_furbetta_2' funzione che prende la data, minuti secondi di sistema e li assembla
' per utilizzarli as esempio come suffisso a nome di file o Altro
'versione corta (poco leggibile)
sdata=now
sp1a = left(sdata,6)
sp1b = right(sdata,11)
sp1 = sp1a & sp1b
sp1 = Replace_G(sp1, "/", "")
sp2 = right(sp1,9)
sp2 =trim(sp2,1)
View mio2.py
class myThread1 (threading.Thread):
def __init__(self, threadID, name, counter):
threading.Thread.__init__(self)
self.threadID = threadID
self.name = name
self.counter = counter
def run(self):
progress ()#self.name, self.counter, 1)
class myThread2 (threading.Thread):
def __init__(self, threadID, name, counter):
View mio.py
class myThread (threading.Thread):
def __init__(self, threadID, name, counter):
threading.Thread.__init__(self)
self.threadID = threadID
self.name = name
self.counter = counter
def run(self):
progress ()#self.name, self.counter, 1)
firme_in_calce ()#(self.name, self.counter, 1)
struttura_ComputoM()