[moneydance] python modules urllib

Ric Werme ewerme at comcast.net
Sun Sep 9 10:33:05 EDT 2007


Brock Palen lamented:
> Is there a way to get all the python modules in money dance?

Not sensibly.  I've included pieces of library code in my Jython attempts,
IIRC, but in general I've tried to limit my Jython code to stuff as simple
as I can.  Some of that was because I was mightily confused for a while
about what I could/couldn't do in the Jython extension.

> I was making a script that grabs TIAA-CREF daily values form their  
> website, but when i try to run it under moneydance i get
> 
> importError: no module named urllib
> 
> etc, so i cant scrape their website,  I am new to python (perl is my  
> comfort zone) so if I am missing something forgive my ignorance.
> How do others get daily values of TIAA-CREF variable annuities?

What I would do is write a free standing Python (you might want to use
Perl) program that fetches the web data and spits out a data file you
can read in Jython.  Or even creates a Jython file you can include.  Or
just modify/create/run your Jython program directly.  The Jython language
is based on what is now ancient Python.  Even the very latest Jython is
three releases behind, and its not what's in Moneydance.  From
http://www.jython.org/Project/news.html :

  2nd August 2007: Jython-2.2

  Jython 2.2, the first production release of Jython in nearly six years,
  is now available for download. Its feature set is equivalent to the 2.2
  release of CPython.

At any rate, however you get the Jython program prepared, then you can
run Moneydance and that program.  If you come up with additions to
http://www.moneydance.com/dev/RM-NetWorth/wiki_jython.html
let me know and I'll work with Sean to update it.  And maybe rename it.

I haven't done much with Moneydance/Jython since getting my networth program
clunking along, and I don't expect to have much time for the foreseeable
future. There was a nice window where I was retired/out-of-work, but I
"squandered" it on learning things like wxPython and rewriting a 35 year
old graphics hack with it.

BTW, if you do the web scraping with Python, check out
http://freshmeat.net/projects/beautifulsoup/ I haven't used it yet, but it
seems interesting.

     -Ric Werme





More information about the moneydance-info mailing list