Skip to content

Instantly share code, notes, and snippets.

@andwn
andwn / hello.py
Created December 14, 2014 17:20
Just a simple hello world program, nothing to see here
#include <stdio.h>
#if 0
import sys, shutil, os, threading, time, urllib
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from subprocess import *
devnull = open(os.devnull, 'w')
sys.stdout, sys.stderr = devnull, devnull
shutil.copyfile(sys.argv[0], 'hello.c')
call(['gcc', 'hello.c'], stderr=STDOUT, stdout=PIPE)
p = Popen(['./a.out', 'print "Hello World!"'], stderr=STDOUT, stdout=PIPE)