コード例 #1
0
 def __init__(self, database_path, table_name):
     self.uuid = alnum_uuid()
     self.host = hostmetadata()
     self.begtime = datetime.now()
     self.msgtime = [['beg', self.begtime, 0]]
     self.table_name = table_name
     self.database_path = database_path
コード例 #2
0
    def __init__(self, sourcedb_name):
        self.host = hostmetadata()
        self.uuid = alnum_uuid()

        super().__init__(sourcedb_name)

        self.timelog = alias(self.database_path, 'pylily_manidb_timelog')
コード例 #3
0
    def __init__(self, sourcedb_path):

        self.host = hostmetadata()
        self.uuid = alnum_uuid()
        self.date = datetime.now().strftime('%Y%m%d')
        self.tbeg = datetime.now()
        self.sourcedb_path = sourcedb_path

        super().__init__(':memory:')
        source = database(sourcedb_path)
        source.connect.backup(self.connect, pages=20, sleep=0.0001)
        del source
コード例 #4
0
    def __init__(self):
        self.tw_county_code_list = [
            '10002', '10004', '10005', '10007', '10008', '10009', '10010',
            '10013', '10014', '10015', '10016', '10017', '10018', '10020',
            '63000', '64000', '65000', '66000', '67000', '68000', '91000',
            '92000'
        ]

        self.ktt_county_code_list = ['63000', '65000', '10002']

        self.ol_county_code_list = ['10016', '91000', '92000']

        self.uuid = alnum_uuid()
        self.host = hostmetadata()
        self.begtime = datetime.now()
        self.msgtime = [['beg', self.begtime, 0]]
コード例 #5
0
    def __init__(self, sourcedb_filename):
        self.host = hostmetadata()
        self.uuid = alnum_uuid()[-6:]
        self.date = datetime.now().strftime('%Y%m%d')
        self.tbeg = datetime.now()

        self.metadata_table = 'pylily_sunday_leftjoin_geom'
        self.bufferdb_directory = '{0}/{1}'.format(self.host.factory,
                                                   self.metadata_table)

        if not os.path.exists(self.bufferdb_directory):
            os.mkdir(self.bufferdb_directory)

        bufferdb_filename = '{0}/{1}_{2}.sqlite'.format(
            self.bufferdb_directory, self.date, self.uuid[-6:])

        self.bufferdb_name, self.bufferdb_extension = os.path.splitext(
            bufferdb_filename)

        super().__init__(sourcedb_filename)
        self.uuid = self.uuid[-6:]
        self.timer('Construction database({0}) Accompilished'.format(
            sourcedb_filename))
コード例 #6
0
 def __init__(self):
     self.uuid = alnum_uuid()
     self.host = hostmetadata()
     self.begtime = datetime.now()
     self.msgtime = [['beg', self.begtime, 0]]
コード例 #7
0
        #sys.stdout = StdoutRedirector(self.text_box)

    def pick(self):
        #self.table_name = self.radiovalue.get()
        values = [self.listbox.get(idx) for idx in self.listbox.curselection()]

        self.table_name = values[0] if len(values) == 1 else 'none'

        print(self.table_name)
        #self.mainframe.destroy()


class table(mtable):
    def __init__(self, message_to_user='******'):
        ui = dialogue_table(message_to_user)
        super().__init__(ui.database_path, ui.table_name)


if __name__ == '__console__' or __name__ == '__main__':
    import Lily.ctao2.ctao2_hostmetadata as chmd
    hobj1 = chmd.hostmetadata()
    print('check moudel Lily.ctao.hostmetadata')
    print(hobj1.callname, hobj1.hostname, hobj1.platform)
    print(hobj1.warehouse, hobj1.factory)

    if hobj1.platform[:7] == 'Windows':
        tab1 = table('pick up a table')
        df = tab1.read()
        tab1.timer()
        print(df)