Jython Example on Mac?

craig5's Avatar


20 Nov, 2010 11:38 PM

I would like a simple example of how to run a python (jython) script on a mac.

Obviously, I need to reference the moneydance jar one way or another. Do I simply put it in my class path and start up java or what?

I would like to be able to query my MD data via the command line for some simple tasks.

Thank you!

  1. 1 Posted by Angie Rauscher on 23 Nov, 2010 01:14 PM

    Angie Rauscher's Avatar


    Have you installed the Python Scripting Interface extension in Moneydance? You can find one example of a Python script attached to post 4 here. Don't actually run it unless you're okay with force clearing all your online connections. I hope this helps, but do let me know if I can be of further assistance.

    Angie Rauscher
    Moneydance Support

    Check out our new blog series, Moneydance on the Road.

  2. Angie Rauscher closed this discussion on 23 Nov, 2010 01:14 PM.

  3. craig5 re-opened this discussion on 23 Nov, 2010 07:37 PM

  4. 2 Posted by craig5 on 23 Nov, 2010 07:37 PM

    craig5's Avatar

    Hi. Thank you for the reply, but this is not what I was looking for.

    I don't want to run anything from within Mondaydance itself. (I.e. I am not looking to develop an extension just yet.) I need to be able to access my data via the command line. The following example is great for Linux, but does not work on a Mac:


    Specifically, it refers to starting up the moneydance app:

    moneydance -invoke_and_quit moneydance:fmodule:jpython:runfile?=networth.py

    That doesn't work on a mac. Again, I need to know how to load the moneydance jar files properly. (I am a programmer, but I don't know python very well.)

    I'd like a simple script that just shows some data and exactly how you can run it form the command line.

    Thank you!!

  5. 3 Posted by Ben Spencer on 24 Nov, 2010 07:32 PM

    Ben Spencer's Avatar

    Hi Craig5

    Try the following command:

    open /Applications/Moneydance.app --args -invoke_and_quit moneydance:fmodule:jpython:runfile?=networth.py

    Ben Spencer
    Moneydance Support

  6. 4 Posted by Ben Spencer on 24 Nov, 2010 07:33 PM

    Ben Spencer's Avatar

    The above will look for networth.py in the folder you run the command from.

  7. 5 Posted by craig5 on 28 Dec, 2010 02:41 AM

    craig5's Avatar

    Sorry for the delay...

    The above did not work. Moneydance did "flash" on the screen for a second, but that's all.

    ALso, what would happen if moneydance is already running?

    I need to be able to run this via cron and from a remote machine, so having a GUI app popup may not be what I'm looking for.

    I am really hoping that I just need to set Java's CLASSPATH properly.

    Is is possible to write a totally command line app in Java? My biggest goal is to be able to do everything via the command line. If it requires Java, that's totally fine.


  8. 6 Posted by Jessica Little on 28 Dec, 2010 03:45 PM

    Jessica Little's Avatar

    Hi Craig,

    I believe, if you're using Jython, there isn't a way to invoke Moneydance without having the GUI flash up while the script is running. That's just a limitation of our Jython interface.

    If you'd like to write a Java script, you may find our Extension developers Kit useful, as well as the Extension API. It's not exactly what you're looking for, but it might help you figure out the set up you need for a command line app. You can find both in the developers section of our website (http://moneydance.com/developer).

    Hope that helps!

    Jessica Little
    Moneydance Support

  9. 7 Posted by matt on 16 Jan, 2011 03:13 PM

    matt's Avatar

    Hi Craig,

    Did you have any luck getting this to work? I spent a significant amount of time getting this to work a few years ago. I was helped a lot by emailing Ric Werme (linked to from the developer's page), who was very responsive. Unfortunately, I was never able to prevent the startup screen from flashing up. Furthermore, everything broke with the update to Moneydance 2010, and given how poor the developer support is, I have little hope of getting it to work again.

    I've been a Moneydance user for about five years. Using Moneydance is death by a thousand little nicks. There are numerous annoying interface quirks. The Developer API exists but is not what one would expect. The fact that the only developer docs are pointers to third-party sites last updated in 2005 is a good testament to the state of Moneydance, as well as to any hopes that these issues will be developed in the near future or ever.

    I wish I could suggest another program, but there aren't really any. I'd love to switch to something but Moneydance is just good enough that I can keep using it, despite the many annoyances, the poor support, the tone-deaf development (the 2010 update basically reorganized the home screen -- that's all, and the iPhone app, which must have taken an inordinate development effort, basically reimplements the whole program instead of doing something like what you'd expect, namely quickly entering transactions on the road). Given the poor implementation and documentation, the existence of the API is really disheartening. It would almost be better if there were nothing at all, so as not to get one's hopes up.


  10. 8 Posted by craig5 on 23 Feb, 2011 03:53 AM

    craig5's Avatar

    Hi Matt.

    Sorry for the long delay (work and stuff).

    I have given up on getting a real cli app going. I am more than a little disappointed that I couldn't be given a simple "hello world" program. I mean for them to just point me at the developers area was really lame. It was obvious from me previous posts that I had already tried that.

    I am looking for alternatives. I hear a lot of good things about iBank. But, they don't mention any kind of API, which, to be honest, puts it only slightly behind MD b/c the MD API doesn't do what I need anyway.

    I wish you the best of the luck. But, after years of frustration, Im throwing in the towel...

  11. 9 Posted by matt on 23 Feb, 2011 04:51 PM

    matt's Avatar


    Thanks for the response. I have similar frustrations: it seems like there is fair demand for CLI access, and that it wouldn't take long for them to post a working example that would answer most of these questions. From the piecemeal responses I gather that it is not a priority for them.

    Years of frustration from poor support and a lack of a response drove me elsewhere, too. I discovered MoneyWell , and am ecstatic about it. The whole reason I was experimenting with the CLI was so that I could write budget reports that could be emailed to both my wife and I, so we'd have daily access to the current state of our monthly budget. That was already a hack, and MoneyWell solves the problem by adapting envelope budgeting to people whose primary spending is done through credit and debit cards. Income is allocated to categorical "buckets" on a regular basis; these buckets are a virtual layer on top of your actual accounts, and spending is driven from them. I'd encourage you to check it out.


  12. 10 Posted by Angie Rauscher on 23 Feb, 2011 05:25 PM

    Angie Rauscher's Avatar


    I'm glad you found a program that better meets your needs, and I'm sorry our program didn't. If there's some way I can be of assistance I hope you'll let us know.

    Angie Rauscher
    Moneydance Support

  13. Jessica Little closed this discussion on 23 Feb, 2011 07:46 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? 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