mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
* Add lp-shell: Open an interactive Python shell with a
launchpadlib.Launchpad object "lp" which is ready for use. If the first command line argument is "staging", this will be on staging instead of production. * Add doc/lp-shell.1: Manpage.
This commit is contained in:
parent
df9a4986c5
commit
ddd6372281
10
debian/changelog
vendored
10
debian/changelog
vendored
@ -1,3 +1,13 @@
|
|||||||
|
ubuntu-dev-tools (0.89) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
* Add lp-shell: Open an interactive Python shell with a
|
||||||
|
launchpadlib.Launchpad object "lp" which is ready for use.
|
||||||
|
If the first command line argument is "staging", this will be on staging
|
||||||
|
instead of production.
|
||||||
|
* Add doc/lp-shell.1: Manpage.
|
||||||
|
|
||||||
|
-- Martin Pitt <martin.pitt@ubuntu.com> Wed, 13 Jan 2010 14:22:11 +0100
|
||||||
|
|
||||||
ubuntu-dev-tools (0.88) UNRELEASED; urgency=low
|
ubuntu-dev-tools (0.88) UNRELEASED; urgency=low
|
||||||
|
|
||||||
[ Siegfried-Angel Gevatter Pujals ]
|
[ Siegfried-Angel Gevatter Pujals ]
|
||||||
|
27
doc/lp-shell.1
Normal file
27
doc/lp-shell.1
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
.TH lp-shell "1" "13 January 2010" "ubuntu-dev-tools"
|
||||||
|
.SH NAME
|
||||||
|
lp\-shell \- Open an interactive launchpadlib shell.
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B lp\-shell
|
||||||
|
[ staging ]
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.B lp\-shell
|
||||||
|
opens an interactive Python shell with a launchpadlib.Launchpad object "lp"
|
||||||
|
which is ready for use.
|
||||||
|
|
||||||
|
It authenticates against Launchpad with the consumer name "test".
|
||||||
|
|
||||||
|
If you want to connect to staging instead of production, call
|
||||||
|
.B lp\-shell
|
||||||
|
with the
|
||||||
|
.B staging
|
||||||
|
argument.
|
||||||
|
|
||||||
|
.SH AUTHORS
|
||||||
|
.B lp\-shell
|
||||||
|
was written by Martin Pitt <martin.pitt@ubuntu.com>.
|
||||||
|
.PP
|
||||||
|
It is released under the terms of the GNU General Public License, version 2
|
||||||
|
or (at your option) any later version.
|
27
lp-shell
Executable file
27
lp-shell
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/python -i
|
||||||
|
|
||||||
|
# open an interactive launchpadlib Python shell. If the first command line
|
||||||
|
# argument is "staging", this will be on staging instead of production.
|
||||||
|
|
||||||
|
# Author: Martin Pitt <martin.pitt@ubuntu.com>
|
||||||
|
# Copyright: (C) 2010 Canonical Ltd.
|
||||||
|
#
|
||||||
|
# This package is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, at version 2.
|
||||||
|
#
|
||||||
|
# This package is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
import code, os, sys
|
||||||
|
|
||||||
|
from launchpadlib.launchpad import Launchpad, STAGING_SERVICE_ROOT, EDGE_SERVICE_ROOT
|
||||||
|
|
||||||
|
if len(sys.argv) == 2 and sys.argv[1] == 'staging':
|
||||||
|
instance = STAGING_SERVICE_ROOT
|
||||||
|
else:
|
||||||
|
instance = EDGE_SERVICE_ROOT
|
||||||
|
|
||||||
|
lp = Launchpad.login_with('test', instance)
|
Loading…
x
Reference in New Issue
Block a user