[英]Inappropriate ioctl for device with python and wandbox API
before you guys say this is a duplicate question.. its not.在你们说这是一个重复的问题之前..它不是。 This is in python and im using the wandbox API.
这是在 python 中,我使用的是魔杖盒 API。 Heres my code
这是我的代码
@bot.command()
async def linux(ctx):
ez= os.popen("wandbox -f test.py 2> /dev/stdout").read()
print(f"```{ez}```")
Im trying to make a linux command (discord.py) that everybody can use.我试图制作一个每个人都可以使用的 linux 命令(discord.py)。 Im trying to use the wandbox API though, its not working as expected.
我尝试使用魔杖盒 API,但它没有按预期工作。 The code is supposed to run the file test.py.. Heres the code for test.py
该代码应该运行文件 test.py .. 这是 test.py 的代码
import os
os.system("ls")
It should be returning with prog.py although im getting the error Inappropriate ioctl for device.它应该与prog.py一起返回,尽管我收到错误 Inappropriate ioctl for device。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.