Closed anki-code closed 1 year ago
Hi,
This should "just work" by installing xonsh's Jupyter kernel and selecting the "xonsh" kernel in euporie.
However, it looks like there is currently an unresolved bug in the xonsh kernel which prevents it from working properly in the latest version of xonsh.
With xonsh_jupyter
fixed as per https://github.com/xonsh/xontrib-jupyter/pull/10, if you change your kernel to xonsh
, you can run xonsh in euporie:
However, testing this has thrown up a couple of bugs in euporie:
Wow! Looks awesome! Thanks! I will share this to the xonsh community.
@joouha feel free to add xonsh
or/and xontrib
topics to the repository settings.
Wow! Looks awesome! Thanks! I will share this to the xonsh community.
Thanks! It won't work out-of-the-box just yet, I still need to fix some bugs and make a new release, but I'll update here when everything works as expected.
Ok! I will wait the next release. Thanks!
I've added:
Todo:
Thank you for your efforts to support xonsh!
I've made a new release v2.3.2
which has all the fixes mentioned above.
With the fixes to xontrib-jupyter-shell
, xonsh now works really nicely in euporie 🏆
Mentioned Euporie in xonsh 0.14 release.
@joouha if you have time please test xontrib-jupyter. I tried to run it with Euporie and sometimes when I run just ls
in the cell I have no result in output.
You'll notice that xonsh commands implemented in Python return output, while there is no output from external commands.
This is because the xonsh kernel isn't capturing the stdout of subprocesses spawned by xonsh properly.
I've had a quick look, and it looks like xonsh transforms subproc-mode input lines into uncaptured subprocess calls, which get sent to stdout and are not captured by the kernel.
If you set the XONSH_CAPTURE_ALWAYS
environment variable to True
, it will work as expected.
I'll make a PR to set this be default in the xonsh kernel.
Thanks! XONSH_CAPTURE_ALWAYS is False by made decision and PR is not needed. We just need to add this to docs around jupyter xontrib.
It looks to me like the current default value of XONSH_CAPTURE_ALWAYS
is False - it HAS to be True
for xonsh kernel to capture subprocess output properly, so I think the PR is needed.
Ah, you mean PR into xontrib-jupyter. Yep, agree. Thanks!
Hi! Thank you for the awesome tool! Is there a way to use xonsh shell language in the cells? Thanks!
For community
⬇️ Please click the 👍 reaction instead of leaving a
+1
or 👍 comment