[英]Markdown Preview Enhanced VSCode run code chunk
I am trying to run code cells as the Markdown Preview Enhanced allows.我正在尝试按照 Markdown 预览增强版允许的方式运行代码单元。 However, when I try to do this, I get no output.
但是,当我尝试这样做时,我没有得到 output。 I have enabled script execution as the documentation suggests.
我已经按照文档的建议启用了脚本执行。 If anyone else uses this wonderful extension and knows how to do it, please let me know.
如果其他人使用这个美妙的扩展并且知道怎么做,请告诉我。 Here is an example of a block that I have tried.
这是我尝试过的块的示例。 I have also tried with
{cmd = True}
and no brackets.我也尝试过使用
{cmd = True}
并且没有括号。
```python {cmd='usr/local/bin/env'}
print('hi')
\``` # That slash is just to escape the backticks within this code block
```python {cmd}
print('hi')
```
produces生产
hi
as expected.正如预期的那样。
Possibly your installed python is not on your path - check by running python in the terminal.可能您安装的 python 不在您的路径上 - 通过在终端中运行 python 进行检查。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.