Skip to content

Embedding Xonsh #5260

Jan 5, 2024 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

Here is the full and correct embedding, I think:

import xonsh.built_ins
import xonsh.execer
import xonsh.imphooks

execer = xonsh.execer.Execer()
xonsh.built_ins.XSH.load(execer=execer)
xonsh.imphooks.install_import_hooks(execer=execer) 

Given the level of init going on, I'm guessing this doesn't read xonshrc or similar. But that's just conjecture.

I might hop on my personal account and submit this as a PR.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@jamie-at-arkifi
Comment options

Comment options

You must be logged in to vote
2 replies
@anki-code
Comment options

@jamie-at-arkifi
Comment options

Answer selected by anki-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants