[moneydance] python modules urllib
Jim Karcz
jkarcz at gmail.com
Thu Sep 6 09:23:29 EDT 2007
I suppose if one knew java, they do provide a java development kit for
extensions. I don't know java enough to even attempt something like
that. My case was a one-shot deal at the time. Python should be able
to handle that, but I know Perl better.
On 9/5/07, Brock Palen <brockp at mlds-networks.com> wrote:
> This looks like the set_prices.py from the dev site:
> http://moneydance.com/dev/set_prices.py
>
> I was going to use that once i had all the site scraping together.
>
> yeah i prototyped it in perl, and then set out to learn python, with
> the hope I could put it all insize moneydance and not do like you
> describe.
>
> What about doing it all in java? are all the standard java libraries
> available if I made a plugin?
>
> Brock Palen
> Center for Advanced Computing
> brockp at umich.edu
> (734)936-1985
>
>
> On Sep 5, 2007, at 9:08 PM, Jim Karcz wrote:
>
> > That brings back some memories.
> >
> > The following if a bit of a hack, but it worked.
> >
> > I think I did a cut and paste to a text file from my site where I
> > displayed the entire price history. I then parsed the results with a
> > perl script which put it into the format that the python script below
> > needs. I populated the list of setPriceForSecurity function calls, one
> > for each date.
> >
> > I'm not sure where I got the script from though. I did this back
> > in aug
> > of 2006 so it might still work. I am also not sure why everything is
> > written as 1/price.
> >
> >
> >
> > ##set_prices.py
> >
> > root = moneydance.getRootAccount()
> > currencies = root.getCurrencyTable()
> >
> > def setPriceForSecurity(symbol, price, dateint):
> > security = currencies.getCurrencyByTickerSymbol(symbol)
> > if not security:
> > print "No security with symbol/name: %s"%(symbol)
> > return
> > if dateint:
> > security.setUserRate(price)
> > security.setSnapshotInt(dateint, price)
> > print "Successfully set price for %s"%(security)
> >
> >
> > setPriceForSecurity('HW-GEF', 1/71.116258, 20050218)
> > setPriceForSecurity('HW-GEF', 1/77.355404, 20060817)
> >
> >
> >
> > Brock Palen wrote:
> >> Is there a way to get all the python modules in money dance?
> >> 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?
> >>
> >>
> >>
> >> Brock Palen
> >> brockp at mlds-networks.com
> >> www.mlds-networks.com
> >> MLDS Owner Senior Tech.
> >>
> >>
> >> _______________________________________________
> >> moneydance-info mailing list
> >> moneydance-info at moneydance.com
> >> http://moneydance.com/mailman/listinfo/moneydance-info
> >>
> >
> > _______________________________________________
> > moneydance-info mailing list
> > moneydance-info at moneydance.com
> > http://moneydance.com/mailman/listinfo/moneydance-info
>
> _______________________________________________
> moneydance-info mailing list
> moneydance-info at moneydance.com
> http://moneydance.com/mailman/listinfo/moneydance-info
>
More information about the moneydance-info
mailing list