Last active
September 20, 2017 15:24
-
-
Save wjt/b5255ab76d2aa866301f3e64f2dcc05e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from gi.repository import Gio | |
resolver = Gio.Resolver.get_default() | |
name = 'sdk.gnome.org' | |
print('Looking up', name) | |
addresses = resolver.lookup_by_name(name) | |
print('Results:') | |
for a in addresses: | |
print(a.get_family().value_nick, a.to_string(), a) | |
print('--------') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment