tag:infinitekind.tenderapp.com,2009-01-14:/discussions/moneydance-development/6674-python-3-supportInfinite Kind: Discussion 2022-01-31T13:40:21Ztag:infinitekind.tenderapp.com,2009-01-14:Comment/494626592021-10-30T04:27:31Z2021-10-30T04:27:31ZPython 3 support<div><p>I doubt it... MD is providing Jython (not Python) which is based on PY2.7.... This is a Java codebase so that it can access MD Java APIs.. There is nothing newer than JY2.7..</p>
<p>out of interest, is there anything in PY3 that you've found you cannot do in PY2?</p></div>Stuart Beesley (Mr Toolbox)tag:infinitekind.tenderapp.com,2009-01-14:Comment/494626592021-10-30T19:52:02Z2021-10-30T19:52:02ZPython 3 support<div><p>So it's possible to gain access to the root directory in a roundabout way in python3, and I have documented that <a href="https://github.com/dkfurrow/md_python_headless_demo">here.</a> (Use at your own risk, be sure to backup your data).<br>
<br>
That's pretty much how I access MD these days...the only thing I still use the app for is downloading and reconciling bank accounts, manual and automated transaction entry. Everything else (downloading of investment transactions, security prices, all reporting functionality) I run through python.<br>
<br>
In response to Stuart, most of the important python packages for any sort of data manipulation (numpy, pandas, spark, etc), cloud computing (aws, azure) are no longer supporting py2, and my clients don't want unsupported base packages underneath code I write for them, so that pretty well forced the switch for me. At least for me, using <a href="https://jpype.readthedocs.io/en/latest/">jpype</a> as detailed above to get at the data works well enough for now.</p></div>dalefurrow (Fellow User)tag:infinitekind.tenderapp.com,2009-01-14:Comment/494626592021-10-31T18:36:47Z2021-10-31T18:39:25ZPython 3 support<div><p>My main point is that I find it bad practice to use unsupported software. While Jython is "supported" the python community no longer supports version 2.7. The continuation of using Jython seems like a way to pretend that a section of your software is not stale.</p></div>robert.stickneytag:infinitekind.tenderapp.com,2009-01-14:Comment/494626592021-10-31T18:57:03Z2021-10-31T18:57:05ZPython 3 support<div><p>Oh and I forgot to add: Thank you Dale. While i did run across jpyp, I am very grateful that you made this tutorial!</p></div>robert.stickneytag:infinitekind.tenderapp.com,2009-01-14:Comment/494626592021-10-31T19:11:41Z2021-10-31T19:11:41ZPython 3 support<div><p>FYI - using Dale's original scripts (thanks Dale!), I made some tweaks that allow access using JPype and also Jython, with the passing of the passphrase too...</p>
<p>Examples at the end of my site:<br>
<a href="https://yogi1967.github.io/MoneydancePythonScripts/">https://yogi1967.github.io/MoneydancePythonScripts/</a></p></div>Stuart Beesley (Mr Toolbox)tag:infinitekind.tenderapp.com,2009-01-14:Comment/494626592021-10-31T19:13:21Z2021-10-31T19:13:21ZPython 3 support<div><p>Ah, that's right--Thanks Stuart. I was gonna add that to the repo, haven't got to it yet.</p></div>dalefurrow (Fellow User)tag:infinitekind.tenderapp.com,2009-01-14:Comment/494626592021-10-31T19:58:07Z2021-10-31T19:58:07ZPython 3 support<div><p>PPS - I just tried my scripts on the latest versions of MD/Java and not working.... Will have to investigate....</p></div>Stuart Beesley (Mr Toolbox)tag:infinitekind.tenderapp.com,2009-01-14:Comment/494626592021-11-01T13:36:35Z2021-11-01T13:36:35ZPython 3 support<div><p>I just reverified my scripts. The ones that access MD headless via Jython all work perfectly. My JPype script (variant of yours) that allows you to feed a specific password is also ok. The one using JPype and setting the environment variable is no longer working… something to do with the UI trying to load (which works fine with Jython, not JPype)… oh well.</p></div>Stuart Beesley (Mr Toolbox)