nbstata
nbstata copied to clipboard
Add StataNow 19 new default installation paths on Windows and macOS and fix a small issue in set_pystata_path()
Hi Tim
My Uni just got Stata 19. Rather to my surprise StataCorp. have changed the default installation paths on both Windows and macOS.
On Windows it is now: C:\Program Files\StataNow19
On macOS it is now: /Applications/StataNow
I have done my best to add these into the code.
Feel free to edit - I'm not particularly experienced with Python.
Also I spotted an issue with the stata_dir config parameter - I noticed if I put either single or double quotes around it in my nbstata.conf file as the docs suggest I should be able to then set_pystata_path() failed. I have put two calls in to strip either quotes if found from the stata_dir object. You might know a better way to do this.
All the best Tom
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Thank you! I'll try to review early this week.
(I've tested on Stata 19, so it's not so much that but the StataNow that is affecting the paths.)
(...so we should add auto-checks for StataNow18 paths as well.)
Interesting. When I upgraded Stata 18.0 to StataNow 18.5 I did that from within Stata and all the paths stayed the same. I don't know whether there was a separate StataNow 18 installer - but I could easily add the path to the Windows set. My guess is that StataNow 19 is the first time the paths have changed (on the Statamarkdown repo we didn't get any reports of new filepaths under Stata 18.5).
I've added the possible StataNow18 path.
Oh, OK. I'm probably wrong about that, then. (My shop hasn't opted for StataNow so far.) But it doesn't hurt to add the extra path check. Thanks, again!
Related Statamarkdown PR: https://github.com/Hemken/Statamarkdown/pull/43