View Single Post
Old 12-23-2013, 06:44 PM   #12
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,819
Karma: 28586150
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
from calibre.constants import DEBUG
if DEBUG:
print (whatever)

then prints will only happen when running calibre in debug mode.

See the documentation for QDialogButtonBox, you can add as many types of buttons as you like.


db = self.gui.current_db
db.new_api.add_format(book_id, 'pdf', path)

If you want to use save to disk templates, use the get_components() function from library/save_to_disk.py
kovidgoyal is online now   Reply With Quote