![]() |
#1 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Sep 2013
Device: none
|
Tracing General Program Flow
Hi All,
I'm fairly new to Python Programming, but I have been using calibre for some time now and have been very impressed with its capabilities. In order to get a better feel for the system, I downloaded the source files (as per manual) and have been looking at the code. However, I must confess that looking at the main program and trying to follow the flow of what the program is actually doing is proving quite difficult. Is there any recommended way to begin building some kind of flow diagram (or something similar) so that I can figure out where I need to go to make changes for experimentation? I have tried placing Print statements throughout the code (as per manual), but when I run the program, some show up and others do not. Obviously, the program is branching off at various points and I don't know how to find out where? Its quite confusing -- even though I realize that the program is a very sophisticated piece of code. Any ideas? |
![]() |
![]() |
![]() |
#2 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,265
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you have a specific question about how something works, just ask, I'll be happy to explain.
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Sep 2013
Device: none
|
Hi Kovid & thanks for your reply. I am not a professional programmer, but in doing a little research, it seems that a lot of people de-bug python programs with print statements (as per the Manual).
Accordingly, so far I am going through the source code and placing lots of 'here I am' type Print Statements everywhere. Then I run calibre-debug -g and watch what files are getting opened and am able to trace the progress of the program and get more familiar with its general layout. Its a little slow going, but I'm making progress. I will contact you when I have a little better handle on exactly what it is I'm trying to do? Bernie. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
General Program Template | StevieCoops | Library Management | 3 | 09-30-2013 11:02 PM |
Start Tracing Your Family Tree Now! | tclough | Self-Promotions by Authors and Publishers | 0 | 02-22-2012 08:27 AM |
This Too Shall Pass: Tracing an Ancient Jewish Folktale | avisolo | Self-Promotions by Authors and Publishers | 0 | 10-10-2011 01:51 PM |
Does anyone use "general program mode" template functions? | chaley | Library Management | 0 | 08-16-2011 11:54 AM |