Hey everyone!
Is there a way to access a python library via Arithmetics?
I’d like to call some methods from secrets:
Best wishes,
Shu
Arithmetics: Access python library
shushustorm
#1
1 Like
kingkeith
#2
I believe you will have to edit the arithmetic plugin to specify additional imports you want access to
1 Like
bschaaf
#3
You can use the builtin __import__
function to import a module inline, eg: __import__("math").cos
.
4 Likes
shushustorm
#4
Thanks for your replies @kingkeith and @bschaaf !
Both suggestions were quite helpful! I edited the arithmetics.py to include “(i%10) + 1” rather than “i + 1” as a standard and now got secrets.randbelow(x) running as an argument for Arithmetics from a shortcut via macro!
1 Like