/Python-Cpp-Polyglot

A python script that can be used to make a file that runs on both python interpreter and c++ compilers

Primary LanguagePython

Python-Cpp-Polyglot

A python script that can be used to make a file that runs on both python interpreter and c++ compilers

A polyglot (meaning multilingual) is a file that is read differently but different interpreters/compilers . Check out mitra For an awesome polyglot generator.

Unfortunately , mitra doesn't have .py or .cpp support. and this fact was an inspiration behind this project

So this is a script that takes two files ( a python file and a cpp file) as input and generates a polyglot, maintaining the functionalities of both the files.

USAGE

python3 PythonCppPolyglotMaker.py [Output file name] [Input py file] [Input cpp file]

Demo

demo