Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
313 views
in Technique[技术] by (71.8m points)

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. 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. Im trying to use the wandbox API though, its not working as expected. The code is supposed to run the file test.py.. Heres the code for test.py

import os
os.system("ls")

It should be returning with prog.py although im getting the error Inappropriate ioctl for device.

question from:https://stackoverflow.com/questions/65891602/inappropriate-ioctl-for-device-with-python-and-wandbox-api

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...