Python 3 and ktinter
I'm trying to write an extension using Python 3 and the ktinter module. However when I run it in the Python Interpreter I get the following error message:
Error running script: Traceback (most recent call last):
File "C:\Users\2M\Desktop\Program ming\Moneydance Window.py", line 1, in <module>
from tkinter import *
ImportError: No module named tkinter
Is there any way I can proceed?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Sean Reilly on Nov 12, 2016 @ 09:32 PM
Hi Mike,
Ah yes, tkinter won't be available since the Python interpreter used in Moneydance is Jython - the java-based interpreter. My understanding is that the tk library isn't available on the Jython platform. If that's not true please let me know and I can look into ensuring that the tkinter libraries can be bundled with the next update.
Thanks!
Sean
2 Posted by Mike Enoch on Nov 14, 2016 @ 01:21 PM
Thanks for the info. You're correct the tk library isn't available on Jython.
So it's back to the textbooks and another learning curve for me to climb!
Support Staff 3 Posted by Sean Reilly on Nov 14, 2016 @ 03:53 PM
Yes, sorry about that. Please let me know though what kind of UI interface would be use. We do need to keep it cross-platform, but maybe something like simple HTML would be useful?
We're also working on an interface to interface with user authentication/authorisation such as for online banking logins, in case that's what you're looking for.
Thanks,
Sean
4 Posted by Mike Enoch on Nov 15, 2016 @ 12:27 PM
I'm attempting to write an extension (basically for my own use
initially) that would list all Transaction Reminders in a table,
showing:
Start Date; Payee; Last Date Paid; Next Date Due; Amount; From Account;
To Account.
When particular line is clicked the Edit Transaction Reminder Form
should be displayed. On closure the table would be refreshed.
I've got many years experience of Microsoft Visual Basic and have a
limited knowledge of Python, so Jython and Swing are very new to me.
(I've ordered books!!)
Would you be able to give me advice on the code required to display the
edit-reminders window.
5 Posted by Mike Enoch on Nov 17, 2016 @ 05:58 PM
Edit Transaction Reminder
Support Staff 6 Posted by Sean Reilly on Nov 17, 2016 @ 08:38 PM
Hi Mike,
Great question. This is currently only accessible with the following code:
I'll add a more formal interface to do something like this to a future version.
Thanks!
Sean Reilly
Developer, The Infinite Kind
http://infinitekind.com
7 Posted by Mike Enoch on Nov 19, 2016 @ 07:23 PM
Thank you for the code.
I've now got most of the extension sorted but I can't see how to get the Account Name that the funds, for each Transaction Reminder, are taken from.
Any advice most welcome.
Support Staff 8 Posted by Sean Reilly on Nov 19, 2016 @ 07:40 PM
Hi Mike,
Ah, to get the account for the transaction reminder you’ll just need to call .getTransaction() on the reminder to get a ParentTxn object. On the parent transaction you can call .getAccount() to get the account object that contains that transaction, and then getOtherTxn(i).getAccount() for i=[0…txn.getOtherTxCount()).
Thanks! Sean
9 Posted by Mike Enoch on Nov 28, 2016 @ 07:42 PM
Could you advise me how to show the Reminder Notification window?
Thanks
Mike
System closed this discussion on Feb 27, 2017 @ 07:50 PM.