-
-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide "python -m trio" to drop into trio based REPL #1360
Comments
In case you're using IPython you can use the ...doesn't mean that |
Related tip: Adding this to your IPython profile will automatically turn on Trio mode if it's installed in your current environment. If not, it will try applying
msgs = [""]
try:
import trio
get_ipython().run_line_magic("autoawait", "trio")
msgs.append("Trio-mode %autoawait")
except ImportError:
try:
import nest_asyncio
nest_asyncio.apply()
msgs.append("(nest-asyncio patch applied)")
except ImportError:
pass
print("\n".join(msgs)) |
that sounds like something super useful that should be added to the docs somewhere |
Happy to add it - I think it would make sense as a paragraph or sidebar in the Also, would you agree that I should remove the |
@mikenerone I saw you comment here and have added a reference to IPython in the docs on #2972 trio/docs/source/reference-core.rst Line 1951 in 2551d04
|
Awesome, thanks much! |
Just like "python -m asyncio" so we can use things like "await foo" straight out of the box.
The text was updated successfully, but these errors were encountered: