Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-26-2010, 11:00 AM   #1
offby1
Junior Member
offby1 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jun 2010
Device: iPhone w/ Stanza
Question (Development) What are these apparently-undefined python operators?

I'm looking at the calibre/gui2/convert/look_and_feel.py module, and it's got a bunch of operators in it whose provenance I can't determine:

Code:
    TITLE = _('Look & Feel')
    ICON  = I('lookfeel.svg')
    HELP  = _('Control the look and feel of the output')
The "_" and "I" functions... what are those and where are they defined?
offby1 is offline   Reply With Quote
Old 06-26-2010, 11:01 AM   #2
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: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
They are special builtins the calibre environment defines. They are for easy access to resource files (icons/templates/etc.) and are defined in calibre.utils.resources
kovidgoyal is online now   Reply With Quote
Old 06-26-2010, 11:06 AM   #3
offby1
Junior Member
offby1 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jun 2010
Device: iPhone w/ Stanza
Well, that explains it. I'm editing using Emacs with flymake (an on-the-fly syntax checker) and it's choking on all of these undefined functions. I guess I need to figure out how to make it aware of those functions.
offby1 is offline   Reply With Quote
Old 06-26-2010, 11:19 AM   #4
offby1
Junior Member
offby1 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jun 2010
Device: iPhone w/ Stanza
@kovidgoyal: If you're still tracking this, I'm interested in maybe doing some ui tweaking in the preferences dialog, on Mac OSX. Does the QT designer work with these ui definitions, or do I have to modify them by hand?
offby1 is offline   Reply With Quote
Old 06-26-2010, 11:56 AM   #5
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: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
They are created by Qt Designer.
kovidgoyal is online now   Reply With Quote
Old 06-26-2010, 11:57 AM   #6
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: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by offby1 View Post
Well, that explains it. I'm editing using Emacs with flymake (an on-the-fly syntax checker) and it's choking on all of these undefined functions. I guess I need to figure out how to make it aware of those functions.
There's usually a way to specify builtins for syntax checkers.I use vim with pyflakes and that allows you to set a global variable with a list of extra builtins.
kovidgoyal is online now   Reply With Quote
Reply

Tags
calibre, development, python

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
With Facebook apparently on the verge of dying, what's next? Steven Lake Writers' Corner 17 05-22-2010 12:25 AM
Compensation from Irex [Apparently A Hoax] stonehat iRex 4 03-25-2010 10:45 AM
PRS-600 Sony library - Error undefined omk3 Sony Reader 13 01-22-2010 10:52 AM
Not loading - AttributeError: /usr/bin/python: undefined symbol: FcPatternBuild k8oylos Calibre 3 04-09-2009 07:46 PM
Got stuck with 505 apparently el.astrologo Sony Reader 39 02-10-2009 08:28 PM


All times are GMT -4. The time now is 09:17 AM.


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