Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 12-01-2013, 07:33 PM   #1
sup
Connoisseur
sup began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Sep 2013
Device: Kindle Paperwhite (2012)
ipython somehow not working?

I am running a recipe with calibre 1.3 using ebook-convert. I have inserted


Code:
from calibre import ipython
ipython(locals())
into my recipe but instead of ipython, it launches just python shell (>>>>), tab completion and magix functions do not work. This used to work. am I doing anything wrong? This is on Ubuntu 13.10 wiht calibre downloaded from http://calibre-ebook.com/download_linux .
sup is offline   Reply With Quote
Old 12-01-2013, 10:39 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 38,512
Karma: 17011940
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre no longer bundles ipython with it, as it was very large for little gain. If you wish to use ipython you have to add it manually either by modifying sys.path before calling ipython() or manually copying ipython into the calibre install dir.
kovidgoyal is online now   Reply With Quote
Advert
Old 12-04-2013, 06:19 PM   #3
sup
Connoisseur
sup began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Sep 2013
Device: Kindle Paperwhite (2012)
Quote:
Originally Posted by kovidgoyal View Post
calibre no longer bundles ipython with it, as it was very large for little gain. If you wish to use ipython you have to add it manually either by modifying sys.path before calling ipython() or manually copying ipython into the calibre install dir.
Ok, although I found the feature quite handy. But at least I now know how to embedd ipython anywhere. Would you please update the documentation here: http://manual.calibre-ebook.com/deve...on-interpreter

And the excersie left to the reader as to how to precisely do that:

1. run ipython and run
import sys
print sys.path
[the path you got]
2. to your recipe, add

Code:
import sys
sys.path.extend([the path you got])
import IPython
from IPython.config.loader import Config
# and then put to a suitable place in tour code this: 
IPython.embed(user_ns=locals())
sup is offline   Reply With Quote
Old 12-04-2013, 11:19 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 38,512
Karma: 17011940
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...276ca1937cd2c8
kovidgoyal is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-T1 Can't get wi-fi working Soxendom Sony Reader 3 09-11-2012 10:57 AM
a href links working/not working mimosawind ePub 5 12-09-2011 01:42 PM
Update: Working - not working? exscentric enTourage eDGe 36 07-22-2011 06:38 PM
SD/CF not working evilcat iRex 4 05-19-2008 02:05 PM


All times are GMT -4. The time now is 02:21 AM.


MobileRead.com is a privately owned, operated and funded community.