Sending Commands to Python Program

Wednesday, 22 September 2010, 2,292
>>> import sys,os
>>> def doit(command):
                os.system(command)
                print("Executed")
>>> doit('print("Hello Python!")')
Executed
>>>

Leave a comment
Name(required)
Mail (will not be publishing) (required)
Website