platformerA cross-platform way to compile and run C files | |
Download |
platformer Ranking & Summary
Advertisement
- License:
- Other/Proprietary Li...
- Price:
- FREE
- Publisher Name:
- Maciej Fijalkowski
- Publisher web site:
- http://github.com/fijal/
platformer Tags
platformer Description
platformer is a simple and robust way to call a C compiler from Python. This used to be a part of the PyPy project and got moved away. This example uses py.path.local instances for path manipulation, refer to the pylib documentation for details.Example usage:from platformer import platform, ExternalCompilationInfo, udireci = ExternalCompilationInfo(includes=)c_file = udir.join('x.c')c_file.write('int main() { printf("%f\\n", pow(2.0, 3.0)); return 0; }')exe_file = platform.compile(, eci)res = platform.execute(exe_file)assert res.returncode == 0assert res.out.startswith('8.0')Product's homepage
platformer Related Software