Skip to content

Instantly share code, notes, and snippets.

@wjt
Last active September 20, 2017 15:24
Show Gist options
  • Save wjt/b5255ab76d2aa866301f3e64f2dcc05e to your computer and use it in GitHub Desktop.
Save wjt/b5255ab76d2aa866301f3e64f2dcc05e to your computer and use it in GitHub Desktop.
#!/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