From 3d5afec0a8156d3464a83fbf5f525f9e9f254c9d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 18 Mar 2008 19:50:49 +0000 Subject: [PATCH] Add libprs500-debug executable --- src/libprs500/debug.py | 31 +++++++++++++++++++++++++++++++ src/libprs500/linux.py | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 src/libprs500/debug.py diff --git a/src/libprs500/debug.py b/src/libprs500/debug.py new file mode 100644 index 0000000000..69a3d4159a --- /dev/null +++ b/src/libprs500/debug.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +## Copyright (C) 2008 Kovid Goyal kovid@kovidgoyal.net +## This program 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; either version 2 of the License, or +## (at your option) any later version. +## +## This program 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. +## +## You should have received a copy of the GNU General Public License along +## with this program; if not, write to the Free Software Foundation, Inc., +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +''' +Embedded console for debugging. +''' + +import sys + +def main(args=sys.argv): + from IPython.Shell import IPShellEmbed + ipshell = IPShellEmbed() + ipshell() + + return 0 + +if __name__ == '__main__': + sys.exit(main()) \ No newline at end of file diff --git a/src/libprs500/linux.py b/src/libprs500/linux.py index d883434d6a..904b7aefbc 100644 --- a/src/libprs500/linux.py +++ b/src/libprs500/linux.py @@ -55,7 +55,8 @@ entry_points = { 'isbndb = libprs500.ebooks.metadata.isbndb:main', 'librarything = libprs500.ebooks.metadata.library_thing:main', 'mobi2oeb = libprs500.ebooks.mobi.reader:main', - 'lrf2html = libprs500.ebooks.lrf.html.convert_to:main', + 'lrf2html = libprs500.ebooks.lrf.html.convert_to:main', + 'libprs500-debug = libprs500.debug:main', ], 'gui_scripts' : [ __appname__+' = libprs500.gui2.main:main',