Rev. | 0d628b5d0551b92ad9b7f9008adf8c149241e878 |
---|---|
大小 | 322 字节 |
时间 | 2013-01-22 19:54:51 |
作者 | Shinya TAKEBAYASHI |
Log Message | separated gcc version detector
|
#! /usr/bin/env python
import subprocess
import os
tmpfile = ".tmp.c"
wd = "/tmp/"
cmdline "gcc -v " + wd + tmpfile
def generate_code():
code = '#include <stdio.h> \n int main(int argc, char **argv){return 0;}\n'
open(wd + tmpfile, 'w').write(code)
def ulink():
os.remove('tmp.c')
os.remove('a.out')