Git Product home page Git Product logo

Comments (16)

joouha avatar joouha commented on June 20, 2024 1

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.

from euporie.

joouha avatar joouha commented on June 20, 2024 1

With xonsh_jupyter fixed as per xonsh/xontrib-jupyter#10, if you change your kernel to xonsh, you can run xonsh in euporie:

image

However, testing this has thrown up a couple of bugs in euporie:

  • The xonsh pygments lexer is not shipped with pygments, which caused an error (fixed here: 4227b4d)
  • The kernel fails to start if the xonsh kernel is selected at startup rather than if it is switched to from a python kernel. I'm not sure what's causing this, I'll have to look into it.

from euporie.

anki-code avatar anki-code commented on June 20, 2024 1

I've added:

Todo:

  • When you push the next release I'll announce the Euporia to the community.

Thank you for your efforts to support xonsh!

from euporie.

joouha avatar joouha commented on June 20, 2024 1

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 🏆

from euporie.

anki-code avatar anki-code commented on June 20, 2024 1

I've posted news:

  1. to the xonsh channel on gitter:

image

  1. to our new account on mastodon:

image

from euporie.

anki-code avatar anki-code commented on June 20, 2024

Wow! Looks awesome! Thanks! I will share this to the xonsh community.

from euporie.

anki-code avatar anki-code commented on June 20, 2024

@joouha feel free to add xonsh or/and xontrib topics to the repository settings.

from euporie.

joouha avatar joouha commented on June 20, 2024

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.

from euporie.

anki-code avatar anki-code commented on June 20, 2024

Ok! I will wait the next release. Thanks!

from euporie.

anki-code avatar anki-code commented on June 20, 2024

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.

from euporie.

joouha avatar joouha commented on June 20, 2024

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.

from euporie.

joouha avatar joouha commented on June 20, 2024

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.

from euporie.

anki-code avatar anki-code commented on June 20, 2024

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.

from euporie.

joouha avatar joouha commented on June 20, 2024

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.

from euporie.

anki-code avatar anki-code commented on June 20, 2024

Ah, you mean PR into xontrib-jupyter. Yep, agree. Thanks!

from euporie.

joouha avatar joouha commented on June 20, 2024

Yes, I meant this one:

xonsh/xontrib-jupyter#21

:-)

from euporie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.