You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. Just wanted to point out that while "import os" in cell above enables writing of log file, it also seems to turn off output to the Jupyter notebook. So you can have one or the other, but not both-- output to Jupyter notebook and a log file. It would be nice to be able to get both-- command window output to Jupyter AND a log file. A nice enhancement if there is an easy way to do this.
Thanks again for writing this terrific Stata magic...
The text was updated successfully, but these errors were encountered:
Re-reading your previous issue I realized that I misunderstood the problem. Yes, the way that ipystata captures the output is by opening up a log file, and Python will monitor this log-file to create the output shown in the Jupyter Notebook. In my perception the notebook becomes the log file on steroids so I have never tried to also save a log file while using ipystata with the Jupyter Notebook.
Having said that, looking at the help file for log I believe you should be able to create your own log file without interfering with the main log file by using the name(...) argument, like: log using mylog, replace name(mylog).
From the help file:
name(logname) specifies an optional name you may use to refer to the log
while it is open. You can start multiple log files, give each a
different logname, and then close, temporarily suspend, or resume
them each individually. The default logname is <unnamed>.
I don't have the ability to test it myself right now, but if it doesn't work let me know and we can figure out a way to make it work.
Hi. Just wanted to point out that while "import os" in cell above enables writing of log file, it also seems to turn off output to the Jupyter notebook. So you can have one or the other, but not both-- output to Jupyter notebook and a log file. It would be nice to be able to get both-- command window output to Jupyter AND a log file. A nice enhancement if there is an easy way to do this.
Thanks again for writing this terrific Stata magic...
The text was updated successfully, but these errors were encountered: