from Emulator import get_compiler_info import sys, os, subprocess info = get_compiler_info('C++', 'c++') flags = ['-S%s'%x for x in info.include_paths] flags += ['-D%s'%k + (v and '=%s'%v or '') for (k,v) in info.macros if k not in ('__STDC__', '__cplusplus')] flags += sys.argv[1:] wave = '/home/stefan/projects/boost/dist/bin/wave' command = [wave, '--variadics', '--long_long'] + flags status = subprocess.call(command) print status