Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-01-2013, 06:33 PM   #1
sup
Zealot
sup began at the beginning.
 
Posts: 103
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, 09: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: 45,349
Karma: 27182818
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 offline   Reply With Quote
Advert
Old 12-04-2013, 05:19 PM   #3
sup
Zealot
sup began at the beginning.
 
Posts: 103
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, 10: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: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...276ca1937cd2c8
kovidgoyal is offline   Reply With Quote
Reply


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 09:57 AM
a href links working/not working mimosawind ePub 5 12-09-2011 12:42 PM
Update: Working - not working? exscentric enTourage eDGe 36 07-22-2011 05:38 PM
SD/CF not working evilcat iRex 4 05-19-2008 01:05 PM


All times are GMT -4. The time now is 12:40 PM.


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