![]() |
#1 |
Connoisseur
![]() Posts: 68
Karma: 10
Join Date: May 2015
Device: Kindle Fire 7 (7G), Kindle PW (2G), Kindle Scribe
|
Math functions in GPM
Is there any way to import python math functions for use in general program mode? eg log()
|
![]() |
![]() |
![]() |
#2 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,443
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Connoisseur
![]() Posts: 68
Karma: 10
Join Date: May 2015
Device: Kindle Fire 7 (7G), Kindle PW (2G), Kindle Scribe
|
I guess I phrased my question poorly. How would one import the math lib to a user-defined function?
Code:
program: import math Quote:
|
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,443
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
You didn't read/follow the documentation I linked to. You must create a user-defined python template function using the Template Functions tab found at Preferences / Advanced / Template Functions.
|
![]() |
![]() |
![]() |
#5 | |
Connoisseur
![]() Posts: 68
Karma: 10
Join Date: May 2015
Device: Kindle Fire 7 (7G), Kindle PW (2G), Kindle Scribe
|
Quote:
It appears the disconnect is that the docs for creating template functions say to go to Preferences → Advanced → Template functions, but leave out the last step of then selecting the "Template functions" tab (which for some reason isn't the default for the template functions window); I missed the existence of that tab, and assumed based on the large bold "Template functions" header on the window that I was on the correct screen, so I was attempting to define a template function in what turns out to be the Stored Templates tab. |
|
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Template: unexpected result with gpm | ownedbycats | Library Management | 5 | 03-16-2021 05:17 AM |
New functions | danielr | KOReader | 1 | 11-30-2019 02:56 AM |
Arrays, capturing parens in GPM? | sweth | Library Management | 2 | 09-29-2018 02:59 PM |
Custom column GPM | foobarius | Library Management | 3 | 09-04-2016 07:20 PM |
New functions | poco06 | Calibre | 4 | 05-01-2010 01:39 PM |