-
Notifications
You must be signed in to change notification settings - Fork 216
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
Comments
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
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")))
The text was updated successfully, but these errors were encountered: