compiles and executes code files written in c, cpp, java, python and javascript
Project description
codexec
codexec is a Python package that allows you to execute code written in various programming languages (C, C++, Java, Python, and JavaScript) by making API calls to a server. The package takes code files and optional input files, executes the code, and returns the output.
Features
- Execute code in multiple languages: C, C++, Java, Python, and JavaScript.
- Simple command-line interface (CLI) for executing code files.
- Supports optional input files for code that requires input.
Usage
-
Install the package:
You can install the
codexec
package usingpip
:pip install codexec
-
Basic Usage:
You can run the
codexec
command in your terminal to execute code files.Example of executing a Python file:
codexec path/to/your/code.py
-
With Input File:
If your code requires input, you can specify an input file:
codexec path/to/your/code.py --i path/to/input.txt
-
Supported Languages:
C
(.c)C++
(.cpp)Java
(.java)Python
(.py)JavaScript
(.js)
How it works?
Uses codehelp.in API under the hood.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.