dboyliao
2017-04-15
Python3 support
@e5f3794619f7f3066568bfbf771603103fa12457
--- python_code/__main__.py
+++ python_code/__main__.py
... | ... | @@ -1,15 +1,15 @@ |
1 | 1 |
#!/usr/bin/env python |
2 | 2 |
# -*- coding: utf-8 -*- |
3 |
- |
|
4 |
-from good import __all__ as all_submodules |
|
3 |
+from __future__ import print_function, absolute_import |
|
4 |
+from .good import __all__ as all_submodules |
|
5 | 5 |
import sys |
6 | 6 |
|
7 | 7 |
def main(argv): |
8 | 8 |
if len(argv) > 1 and argv[1] in ["-l", "--list"]: |
9 |
- print "Available submodules: " |
|
9 |
+ print("Available submodules: ") |
|
10 | 10 |
for i, submodule in enumerate(all_submodules, 1): |
11 |
- print "{}. good.{} / bad.{}".format(i, submodule, submodule) |
|
11 |
+ print("{}. good.{} / bad.{}".format(i, submodule, submodule)) |
|
12 | 12 |
|
13 | 13 |
if __name__ == "__main__": |
14 |
- |
|
15 |
- main(sys.argv)(No newline at end of file) |
|
14 |
+ |
|
15 |
+ main(sys.argv) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?