Run python inside python and capture output

This is taken from

How to execute python inside python and capture output:

A quick solution using popen :

import os
print result

where command is your command (expl. on windows: dir,ipconfig,...)

If you expect more than a line and want each word in a list:

import os,string


Popular posts from this blog

converting videos with ffmpeg

Chrome dev tools - secret weapon?