aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-12 18:01:43 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-12 18:01:43 +0800
commit4de1ee376974b6e245d543748885b560a8322277 (patch)
tree4bc59fb271f83952980df05075163972318244f5
parent93681a53a89243f057c295136084e5e719d7b602 (diff)
downloadatoolbox-4de1ee376974b6e245d543748885b560a8322277.tar.bz2
astro/query_{ned,simbad}.py: Use list() on map()
-rwxr-xr-xastro/query_ned.py7
-rwxr-xr-xastro/query_simbad.py7
2 files changed, 4 insertions, 10 deletions
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: #