Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-16-2013, 04:12 PM   #1
bnick0114
Junior Member
bnick0114 began at the beginning.
 
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?
bnick0114 is offline   Reply With Quote
Old 09-16-2013, 10:21 PM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by bnick0114 View Post
Its quite confusing -- even though I realize that the program is a very sophisticated piece of code. Any ideas?
I have no idea of how this works, but here is a top level view that may help to put conversions into perspective.
DoctorOhh is offline   Reply With Quote
Advert
Old 09-16-2013, 10:39 PM   #3
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,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.
kovidgoyal is offline   Reply With Quote
Old 09-18-2013, 11:35 PM   #4
bnick0114
Junior Member
bnick0114 began at the beginning.
 
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.
bnick0114 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 03:13 AM.


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