How to extract a command from a string - python -


i have command this:

test = ('print( "it works!" )' ) 

and want use command inside of string. know how can extract , use it?

thank much, remus

use exec make sure trust code, ie. don't run on user submitted code security reasons

>>> test = ('print( "it works!" )' ) >>> exec test works! 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -