08-21-2012, 06:54 AM | #1 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Using Class Variable in Def
In a plugin ui.py I have:
Code:
class InterfacePlugin(InterfaceAction): name = 'Repository Links' action_spec = (name, None, 'Link book to supplementary material', None) Code:
def show_ui(self): : return error_dialog(self.gui, name, 'Repository file not found', show=True) So, how do I refer to name within a def? |
08-21-2012, 07:05 AM | #2 |
creator of calibre
Posts: 44,039
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
self.name
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Variable payments come to eBooks | WhichP | News | 4 | 08-04-2012 03:52 PM |
PRS-650 SD Card Importance? SDHC, SDHC Class 4, Class 10 etc is it important | Renji | Sony Reader | 11 | 12-03-2011 12:30 PM |
PATH variable in Windows | kapsi | Calibre | 3 | 05-16-2011 05:12 PM |
Questions About def get_browser(self) | Finbar127 | Recipes | 6 | 02-24-2011 09:36 PM |