View Single Post
Old 05-09-2013, 09:48 PM   #1
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Access to calibre functions via ActivePython IDLE?

I hope this is not a dumb question... I'm using ActiveState ActivePython IDLE on Win 7 as my interactive Python environment. I'm not trying to create my own run-from-source version of calibre but I am trying to understand some of calibre's existing classes and functions. I was hoping to set things up so that simple import commands e.g.
Code:
from calibre.ptempfile import PersistentTemporaryDirectory
from calibre.constants import iswindows
from calibre import guess_type
could be entered from IDLE without giving errors.

I had hoped that downloading a calibre archive and taking a copy of dir calibre\src\calibre to my own test area might do the trick but I must be missing some important initial action (some kind of setup ??? perhaps) because I always get an error something like
Code:
sys.path.insert(0, sys.extensions_location)
AttributeError: 'module' object has no attribute 'extensions_location'
I'm aware that I can use the calibre-debug -e option to run my own .py script but I'm finding it very laborious when all I'm trying to do is find out what type of thing (dict, list, method, string etc) a particular calibre item is and to examine some variables. I find it much easier to understand code if I can see the contents of the variables involved.

Is what I want to do possible?
jackie_w is offline   Reply With Quote