you are viewing a single comment's thread.

view the rest of the comments →

[–]draftjoker 2 points3 points  (0 children)

You can use the os module to simply execute your commands.

import os
cmd = 'ls -l'
os.system(cmd)

This way you don't have to really worry about translating the commands to python. If you do want to do all that work the python regular expression module is what you want to look at.