def load_db(self): #print "in load_db" assert os.path.exists(self.database_path), \ 'Could not find db file %s' % self.database_path force = 0 self.db = photo_db.photo_db(self.database_path, \ force_new=force) nr, nc = self.db.data.shape self.num_found_entry.set_text('%i' % nr)
import photo_db import file_finder import socket, os from numpy import loadtxt hostname = socket.gethostname() if hostname == 'AM2': folder = '/home/ryan/git/personal/' else: folder = '/home/ryan/JoshuaRyan_on_AM2/' db_name = 'photo_db.csv' db_path = os.path.join(folder, db_name) force = 0 mydb = photo_db.photo_db(db_path, force_new=force) import rwkos, txt_mixin root = '/mnt/personal/from_SILVERHD/pictures/Joshua_Ryan/2009' folder_names = rwkos.find_dirs(root) for name in folder_names[0:1]: print('\n'*5) print('name = ' + name) folder = os.path.join(root, name) mychecker = photo_db.folder_checker(folder, mydb) mychecker.run()