コード例 #1
0
ファイル: test.py プロジェクト: skasim/gutenberg_scifi
 def setUp(self):
     print "In setUp()"
     self.text = """<h1>She was lifting weights while he was sewing clothes. His wife noticed that \
                     her husband was talking to his grandmother's ghost who was also the princess! The priest was the prince. </h1>"""
     self.fixture = range(1, 10)
     self.files = [
         ["https://www.gutenberg.org/files/84/84-h/84-h.htm", "frank_text.txt"],
         ["https://www.gutenberg.org/cache/epub/42/pg42.html", "dr_JEKYLL.txt"],
     ]
     self.files = open_several_files(self.files)
コード例 #2
0
ファイル: dmin.py プロジェクト: ndanielsen/scifi
def main():

	summary = {}

	filenames = open_several_files(files)

	for filename in filenames:
		text = read_file(filename)
		count = word_counter(text)
		genderedwords = both_genders(text)

		# store the report in the dictionary for each hint: add keys and nested dictionsaries
	pass
コード例 #3
0
ファイル: dmin.py プロジェクト: ndanielsen/scifi
	filenames = open_several_files(files)

	for filename in filenames:
		text = read_file(filename)
		count = word_counter(text)
		genderedwords = both_genders(text)

		# store the report in the dictionary for each hint: add keys and nested dictionsaries
	pass







if __name__ == '__main__':
	

	files = [['https://www.gutenberg.org/files/84/84-h/84-h.htm', 'frank_text.txt'],
        ['https://www.gutenberg.org/cache/epub/42/pg42.html', 'dr_JEKYLL.txt']
        ]

	assert open_several_files(files) == ['frank_text.txt', 'dr_JEKYLL.txt']

	print read_file('data/frank_text.txt')
	
	pass