TiesdeKok / ipystata

Enables the use of Stata together with Python via Jupyter (IPython) notebooks.
192 stars 67 forks source link

Autodetect path of Stata binary #14

Open sergiocorreia opened 8 years ago

sergiocorreia commented 8 years ago

There are ways to get the location of the stata binary by calling the winreg package and looking for some keys. There is an example here for instance:

https://github.com/sergiocorreia/StataEditor/blob/master/StataEditorPlugin.py#L507

It's not perfect but it works quite well for Stata 12-14

TiesdeKok commented 8 years ago

Thanks, that is a great suggestion. I was already playing with the idea of including the ability to automatically register a Stata installation for a given path, combining this with that snippet would essentially automate most of the configuration process. I will put it on my to-do list.

kylebarron commented 6 years ago

This function autodetects the Stata path on Windows.

https://github.com/kylebarron/stata_kernel/blob/dcb590adb7098dfe695491dc5ae7eb404309bfa3/stata_kernel/install.py#L54-L70

kylebarron commented 6 years ago

The StataEditor function seemed old and didn't work on my Windows 10 VM