Skip to content

Commit

Permalink
Merge pull request #2 from mscroggs/master
Browse files Browse the repository at this point in the history
Make the code work in Python3
  • Loading branch information
codebox authored Feb 9, 2018
2 parents 5296869 + f92f1f1 commit f753fa6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions markov.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
db = Db(sqlite3.connect(name + '.db'), Sql())
generator = Generator(name, db, Rnd())
for i in range(0, count):
print generator.generate(WORD_SEPARATOR)
print(generator.generate(WORD_SEPARATOR))

else:
raise ValueError(usage)
raise ValueError(usage)
2 changes: 1 addition & 1 deletion parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def parse(self, txt):

i += 1
if i % 1000 == 0:
print i
print(i)
sys.stdout.flush()

self.db.commit()
Expand Down

0 comments on commit f753fa6

Please sign in to comment.