11-17-2009, 10:56 AM | #1 |
Member
Posts: 18
Karma: 10
Join Date: Nov 2009
Location: Prague, Czech Republic, Europe
Device: iPhone, Sony PRS 505
|
Developer support
Hi all,
I'm developer and I'm trying to setup development environemet on Windows. So far I got Python, Bazar, source code, tried the "hello world" test. So far so good. But for any serious development, one need also debugger. I've tried to read thru help, tried posts here, but so far I found no word about how to debug it. Another question - is there any design documentation, diagrams - about modules for example? Thanks a lot for comments. |
11-17-2009, 11:18 AM | #2 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
I installed the Eclipse IDE which includes a python debugger as an option.
|
Advert | |
|
11-17-2009, 02:10 PM | #3 |
creator of calibre
Posts: 43,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There isn't any design documentation, beyond a brief outline of the code structure in the development section of the User Manual, but feel free to ask any questions and I'll try my best to answer.
On a tangential note, I developed calibre without the use of a debugger and still don't use one today. But python comes witha nice debugging module called pdb. You can use it to do interactive debugging via the command line. Just run calibre-debug and you will get a python prompt with a fully initialized calibre environment. You can them import the pdb module and do whatever debugging you want. |
11-22-2009, 10:21 AM | #4 |
Member
Posts: 18
Karma: 10
Join Date: Nov 2009
Location: Prague, Czech Republic, Europe
Device: iPhone, Sony PRS 505
|
Well, still no luck. if I run calibre-debug, it crashes (crash on the line where is calls ipython()), so no luck.
I also get Eclipse, get Pydef extension, I did some little training on Python and it worked. Next I load calibre sources in Eclipse (created workspace and python project for it), but I still don't know where to start - what is the entry point for running it in debug mode. You know - I'm novice in Python, all my previous experience was in C, C++ and some C#, so forgive, if these are stupid questions. |
11-22-2009, 10:52 AM | #5 | ||
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Quote:
Quote:
|
||
Advert | |
|
11-22-2009, 11:15 AM | #6 |
Member
Posts: 18
Karma: 10
Join Date: Nov 2009
Location: Prague, Czech Republic, Europe
Device: iPhone, Sony PRS 505
|
Hey, thanks, this is really helpfull. Now one more question - I'm trying to test some changes, but I have my library on the same computer. How to separate development environment and production environment? Is changing the library path enough, or do i need to make more adjustments?
Thanks Jirka |
11-22-2009, 11:22 AM | #7 |
creator of calibre
Posts: 43,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Generally speaking changing the library path should be enough, as long as the changes you make don't affect the configuration settings, as they are common too.
|
11-22-2009, 11:30 AM | #8 |
Member
Posts: 18
Karma: 10
Join Date: Nov 2009
Location: Prague, Czech Republic, Europe
Device: iPhone, Sony PRS 505
|
Is there a way to have 2 different sets of configurations other than zipping them and replacing the one one I don't want to use?
|
11-22-2009, 11:36 AM | #9 |
creator of calibre
Posts: 43,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Environment variable CALIBRE_CONFIG_DIRECTORY
|
11-22-2009, 01:09 PM | #10 |
Member
Posts: 18
Karma: 10
Join Date: Nov 2009
Location: Prague, Czech Republic, Europe
Device: iPhone, Sony PRS 505
|
Still problems: now running debugger on debug.py will produce following error:
ImportError: No module named PyQt4.QtCore. I tried to look it up and yes, there is no such module. Any idea what I need to do? I see same issue for PyQt4.QtGui and for mechanize. |
11-22-2009, 01:37 PM | #11 | |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Quote:
|
|
11-22-2009, 01:53 PM | #12 |
Member
Posts: 18
Karma: 10
Join Date: Nov 2009
Location: Prague, Czech Republic, Europe
Device: iPhone, Sony PRS 505
|
Do I really need C++? I though this is Python project. This is starting to be a bit too complicated for me....
|
11-22-2009, 02:11 PM | #13 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
|
11-22-2009, 03:28 PM | #14 |
Member
Posts: 18
Karma: 10
Join Date: Nov 2009
Location: Prague, Czech Republic, Europe
Device: iPhone, Sony PRS 505
|
OK, I'm a bit further. Now the problem is in load_plugins() "constants.py". It ends on the line:
plugin_path = sys.extensions_location AttributeError: 'module' object has no attribute 'extensions_location' Last edited by JirkaS; 11-22-2009 at 03:49 PM. |
11-22-2009, 10:12 PM | #15 |
creator of calibre
Posts: 43,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you are using the method oulined in the user manual then you cant execute calibre scripts with a normal python interpreter, you have to use
calibre-debug -e |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hello from potential developer | whippy | Introduce Yourself | 4 | 06-05-2009 10:20 AM |
New Developer Here | infosprt | Introduce Yourself | 0 | 08-28-2008 07:10 PM |
iLiad Units that download the developer package lose warranty and free of charge support !? | Ovydake | iRex Developer's Corner | 13 | 08-02-2008 10:24 AM |
Developer Kit | Patrick B. Ludwi | iRex | 1 | 06-17-2008 01:46 PM |
PRS-500 Developer needs help getting started | cmumford | Sony Reader Dev Corner | 12 | 12-22-2006 02:28 AM |