Videos
I want to create a Python IDE using Django and JavaScript. I am facing an issue with taking user input when using the exec or eval functions in Python.
After further research, I came across subprocess and IPython, which seem like they could be used to create what I want, but I am still not very confident. Could you please suggest how to create a Python IDE using these tools or any other?
code = "print('Hello, my name is')\nk = input('Enter your name')\nprint(k)"
exec(code)when i run the above code in the vs code by terminal then its
Hello, my name is Enter your name
but when i run in Django then i didn't get
how to achieve same with Django?
code data will come from frontend.
I cant find any conclusive answers. Im trying to use GDB for python but I cant seem to make it work, I keep getting wrong error format. It works well for .c
I want create a breakpoint at open and start debugging.
#!/usr/bin/python
with open('example.txt', 'w') as f:
f.write('hello world')
The program was something like this:
class Pet:
def say(self):
print("Generic pet sound!")
class Dog(Pet):
def say(self):
print("Bark!")
D = Dog()
D.say()
super(Dog, D).say()
It was correct and started working when I reran it. I'm curious what might caused the compiler to give a fork error! Pls let me know if you guys know why it give the error! Thanks!