12.1.1
by Markus Korn
* added 'launchpadlib' category. This category has samples using |
1 |
#!/usr/bin/env python
|
2 |
#
|
|
3 |
# [SNIPPET_NAME: launchpadlib Hello-World]
|
|
4 |
# [SNIPPET_CATEGORIES: launchpadlib]
|
|
5 |
# [SNIPPET_DESCRIPTION: Get launchpad username via launchpadlib]
|
|
6 |
# [SNIPPET_AUTHOR: Markus Korn <thekorn@gmx.de>]
|
|
7 |
# [SNIPPET_LICENSE: GPL]
|
|
8 |
||
9 |
# For more Examples see https://help.launchpad.net/API/Examples
|
|
10 |
||
11 |
from launchpadlib.launchpad import Launchpad, STAGING_SERVICE_ROOT |
|
12 |
||
13 |
# connect to the staging service of launchpad
|
|
14 |
launchpad = Launchpad.login_with("python-snippets", STAGING_SERVICE_ROOT) |
|
15 |
# print username
|
|
16 |
print 'Hello, %s!' % launchpad.me.display_name |