Skip to content
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

print and others don't work #38

Closed
thecaralice opened this issue Apr 24, 2019 · 2 comments
Closed

print and others don't work #38

thecaralice opened this issue Apr 24, 2019 · 2 comments

Comments

@thecaralice
Copy link

When I do $jsk py print('Hello, world!') it doesn't give me anything. Just check this:
image
Here's eval.py cog

@ioistired
Copy link
Contributor

The standard output and standard error of your code is deliberately not captured. Doing so (as you have done on line 67) can interfere with printing in other parts of your bot.

Jishaku provides an alternate way of sending intermediate results. Try using yield "Hello, world!" instead.

@Gorialis
Copy link
Owner

See #39 as to why this is not allowed. You can use yield, return or await _ctx.send(...) instead to send values back to chat. A print shim might exist in the future, but it is unlikely due to sync/async difficulties.

@StarrFox StarrFox mentioned this issue Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants