Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors: How to access the catalogue using Python 3 #1115

Open
JosephKarpinski opened this issue Apr 3, 2021 · 1 comment
Open

Errors: How to access the catalogue using Python 3 #1115

JosephKarpinski opened this issue Apr 3, 2021 · 1 comment

Comments

@JosephKarpinski
Copy link

Current Python 3 examples have errors because print statements now require parentheses.
Please make the following corrections to the 'How to access the catalogue using Python' section:

Output mass and radius of all planets

for planet in oec.findall(".//planet"):
print([planet.findtext("mass"), planet.findtext("radius")])

Find all circumbinary planets

for planet in oec.findall(".//binary/planet"):
print(planet.findtext("name"))

Output distance to planetary system (in pc, if known) and number of planets in system

for system in oec.findall(".//system"):
print(system.findtext("distance"), len(system.findall(".//planet")))

@hannorein
Copy link
Member

Hi Joseph. Can you submit a pull request? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants