From 4de1ee376974b6e245d543748885b560a8322277 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 12 Feb 2017 18:01:43 +0800 Subject: astro/query_{ned,simbad}.py: Use list() on map() --- astro/query_ned.py | 7 ++----- astro/query_simbad.py | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) (limited to 'astro') diff --git a/astro/query_ned.py b/astro/query_ned.py index 22cb5a8..6bfb1ff 100755 --- a/astro/query_ned.py +++ b/astro/query_ned.py @@ -108,9 +108,9 @@ def main(): args = parser.parse_args() try: - names = map(str.strip, open(args.input).readlines()) + names = list(map(str.strip, open(args.input).readlines())) except FileNotFoundError: - names = map(str.strip, args.input.split(",")) + names = list(map(str.strip, args.input.split(","))) results_list = [] @@ -133,6 +133,3 @@ def main(): if __name__ == "__main__": main() - - -# vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=python: # diff --git a/astro/query_simbad.py b/astro/query_simbad.py index c0b7ba3..8c5224d 100755 --- a/astro/query_simbad.py +++ b/astro/query_simbad.py @@ -107,9 +107,9 @@ def main(): args = parser.parse_args() try: - names = map(str.strip, open(args.input).readlines()) + names = list(map(str.strip, open(args.input).readlines())) except FileNotFoundError: - names = map(str.strip, args.input.split(",")) + names = list(map(str.strip, args.input.split(","))) results_list = [] @@ -132,6 +132,3 @@ def main(): if __name__ == "__main__": main() - - -# vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=python: # -- cgit v1.2.2