def __init__(self): # distribution over the type of text: load_cfg(self) self.curvature = Curvature() # text-source : gets english text: self.corpora = Corpora() # get font-state object: self.text_state = TextState() pygame.init()
def __init__(self): """ TXT_FP : path to file containing text data. """ load_cfg(self) #fp = osp.join(self.data_dir, 'newsgroup/newsgroup.txt') #fp = osp.join(self.data_dir, 'newsgroup/alpha_words.txt') self.fdict = { 'WORD': self.sample_word, 'LINE': self.sample_line, 'PARA': self.sample_para } with open(self.corpora_fp, 'r') as f: self.txt = [l.strip() for l in f.readlines()]
def __init__(self): # # get a list of background-images: # imlist = [osp.join(im_path,f) for f in os.listdir(im_path)] # self.bg_list = [p for p in imlist if osp.isfile(p)] load_cfg(self) self.font_color = FontColor(self.font_fp)
def __init__(self): load_cfg(self)
def __init__(self): load_cfg(self) self.text_render = text_renderer.TextRenderer() self.colorizer = Colorizer()