Okay, all I want to do for now, is create a rather simple python interpreter. I have already created a simple command prompt for windows, utilizing the os module, the script's code is here:
import os
os.system("title Command Prompt")
while True:
osc = raw_input(os.getcwd()+">> ")
if osc == "exit" or osc == "quit" or osc == "exit()" or osc == "quit()":
quit()
try:
os.system(osc)
except:
print "Not a valid shell command"
print ""
I want to do the same, but have it evaluate python commands instead. Any help would be appreciated! :D
Also, I've already tried setting a variable to raw_input, then doing eval(variable). That doesn't work.