From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QsJHB-0000zn-27 for garchives@archives.gentoo.org; Sat, 13 Aug 2011 18:49:41 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9B43121C2D9; Sat, 13 Aug 2011 18:49:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 6E1B621C2D9 for ; Sat, 13 Aug 2011 18:49:33 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EBE7F1B4041 for ; Sat, 13 Aug 2011 18:49:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id C88638004B for ; Sat, 13 Aug 2011 18:49:31 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <190d6a524180b0e0a6350b816f5f47fa3142f2b8.mgorny@gentoo> Subject: [gentoo-commits] proj/gentoopm:master commit in: gentoopm/ X-VCS-Repository: proj/gentoopm X-VCS-Files: gentoopm/querycli.py X-VCS-Directories: gentoopm/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 190d6a524180b0e0a6350b816f5f47fa3142f2b8 Date: Sat, 13 Aug 2011 18:49:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: f94a0e176dc1450698191b2b22689055 commit: 190d6a524180b0e0a6350b816f5f47fa3142f2b8 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Sat Aug 13 18:49:42 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Sat Aug 13 18:49:42 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoopm.git;= a=3Dcommit;h=3D190d6a52 gentoopmq shell: import filters and matchers as well. --- gentoopm/querycli.py | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/gentoopm/querycli.py b/gentoopm/querycli.py index 9c773cf..e5813f4 100644 --- a/gentoopm/querycli.py +++ b/gentoopm/querycli.py @@ -112,7 +112,17 @@ class PMQueryCommands(object): Run a Python shell with current PM selected. """ def __call__(self, pm, args): - welc =3D "The %s PM is now available as 'pm' object." % pm.name + import gentoopm.filters as f + import gentoopm.matchers as m + + our_imports =3D ( + ('pm', pm), + ('f', f), + ('m', m)) + + welc =3D '''The following objects have been imported for you:\n''' + welc +=3D '\n'.join(['\t%s: %s' % (key, repr(var)) + for key, var in our_imports]) kwargs =3D {} =20 try: