raw input - Python: Making raw_input execute -


i'm new python (i'm using codecademy , 70% through,) , i'm wondering if it's possible raw_input run actual command. instance, thought use:

command = raw_input(">>>    ") command 

however, when run it, displays >>> , allows me type stuff, code type won't run.

is there way this?

you can use:

command = raw_input(">>>    ") exec(command) 

but beware user can execute anything!


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -