Comments (4)
No, but that makes sense that preserve
doesn't work, now that you mention it.
Well, does it work if you first run %set echo=False
at the top of the notebook?
If not, (A) the explanation is that, behind the scenes, pystata runs each multi-line code cell as if it were a temporary do-file. So, just as running preserve
in a do-file doesn't carry over into interactive mode (or another do-file), preserve
doesn't carry over across cells.
If so, (B) they've made preserve
work across pystata.stata.run
calls (as they've apparently done for locals and version
) and the reason it's not working is that you were using the (nbstata default) echo=None
mode, which is another step more complicated behind the scenes.
Either way, I'd like to fix the issue, if possible. (I routinely use preserve
myself, though I apparently hadn't tried it in a notebook yet.) But a solution is not coming immediately to mind.
from nbstata.
Ah, that's it all right! Works fine without echo = None
. How unfortunate. But at least that means there's a workaround.
from nbstata.
Yes, that's good news. That means I should be able to make it work with echo=None
, too, then. I've got an idea now: it can be implemented in a different way that I perhaps prematurely judged too complicated.
from nbstata.
For now, I pushed a temporary fix that just switches any cell with preserve
or restore
to "echo" mode automatically.
from nbstata.
Related Issues (20)
- Setup bug HOT 1
- Support for frames in %browse magic HOT 6
- `echo = None` breaks indentation in Stata `python:`…`end` blocks HOT 2
- Rendering in Quarto HOT 1
- Syntax highlighting in Jupyter Notebook HOT 2
- MissingIDFieldWarning warning HOT 3
- Automatic matching for local macros HOT 3
- 404 GET message? HOT 2
- Contribute to user guide + Make sure stata works HOT 1
- Stata18 HOT 6
- Kernel crashes with certain comments HOT 1
- Request: conda-forge package HOT 1
- invalid config options HOT 2
- Excessive spacing in %help output HOT 1
- Create a CHANGELOG.md HOT 1
- Browse Functionality HOT 9
- Change Jupyter Lab export menu wording from "Executable Script" to "Stata (.do)" HOT 4
- Run functionality HOT 2
- Locals, globals, dynamic text HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nbstata.