Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
# Import the subprocess module (see https://pymotw.com/2/subprocess for more)
import subprocess
# List files, then create a file and echo into it like you would the shell
subprocess.call("ls")
subprocess.call(["touch", "testing.txt"])
subprocess.call(["echo", "jub jub"])
subprocess.call("echo 'jub jub' > testing.txt", shell=True)
#include <iostream>
using namespace std;
int main()
{
std::cout << "Hello world!" << std::endl;
return 0;
}