Skip to content

Commit

Permalink
#19 - support python 2.7 and 3.6 - add parentheses to print
Browse files Browse the repository at this point in the history
  • Loading branch information
gilwo committed Jun 22, 2017
1 parent 252f2d4 commit 0cba6ec
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This module provides low-level APIs to support other higher-level modules from t
* >>> committees = list(Committee.get_all_active_committees())
* >>> len(committees)
* 19
* >>> print committees[0].name
* >>> print(committees[0].name)
* ועדת הכנסת

### Known issues / FAQ / Common problems
Expand Down
4 changes: 2 additions & 2 deletions bin/protocol_antiword_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@

def main():
if len(sys.argv) != 3:
print help_text.format(cmd=sys.argv[0])
print(help_text.format(cmd=sys.argv[0]))
else:
source_doc_file_name = sys.argv[1]
output_txt_file_name = sys.argv[2]
with BaseProtocolFile.get_from_filename(source_doc_file_name) as protocol:
output_txt = protocol.antiword_text
with open(output_txt_file_name, 'wb') as output_file:
output_file.write(output_txt)
print "DONE"
print("DONE")

if __name__ == "__main__":
logging.basicConfig(stream=sys.stdout, level=logging.WARNING)
Expand Down
6 changes: 3 additions & 3 deletions knesset_data/dataservice/monitor/metadata/initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ def main():
# if r.status_code == 200:
# with open(filename, 'wb') as f:
# f.write(r.content)
# print 'OK!'
# print('OK!')
# else:
# print 'invalid status!'
# print('invalid status!')
# except RequestException as e:
# error = str(e)
# print error
# print(error)


if __name__ == "__main__":
Expand Down
6 changes: 3 additions & 3 deletions knesset_data/protocols/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ def _get_from(cls, file_type, file_data, proxies=None):
yield obj
finally:
if os.environ.get('KNESSET_DATA_PROTOCOLS_KEEP_FILES', None) == "yes":
print "\n"
print "keeping file: %s"%obj.file_name
print "\n"
print("\n")
print("keeping file: %s"%obj.file_name)
print("\n")
else:
obj._close()

Expand Down
Loading

0 comments on commit 0cba6ec

Please sign in to comment.