Skip to main content

A CLI tool to run code

Project description


Build Status

A CLI tool to run code. See more at here


Use pip to install edl-cr.

pip install edl-cr


Use command ecr to run edl-cr.

CLI Mode

Option Description
-w --wdir Set working directory
-c --command Execute command just like in interactive mode

Interactive Mode

If you don't use --command options, edl-cr will run in interactive mode.


> init

Initialize ECR data. It will create a directory named .ecr in current directory.

If you want to clear ECR data, use this command:

> clear

Create and Run

Create a new code file:

> new a.cpp

It will use code template in .ecr/templates/ to create file and set current file with the new file.

If you want to set current file with a existed file, use this:

> now a.cpp

Then use run command to run code.

# run a.cpp
a.cpp> run

# run b.cpp
a.cpp> run b.cpp

# run a.cpp with file input and standard output
a.cpp> run -io fs

Input and Output

The file input is at .ecr/, and the file output is at .ecr/


Clean the compiling output and something else:

> clean


The config files is at .ecr/


This file contains basic config.

    // File extension name to be cleaned
    "tempFileFilter": [

    // Map name to system command
    "importedCommand": {
        "ls": "ls",
        "cls": "clear"

    // The default shell to execute command
    "defaultShell": "powershell -c",

    // The default IO when run
    "defaultIO": "ss",

    // The default time limit for every step when run
    "defaultTimeLimit": 5


This file gives the way to run a code file.

You can use these varible in command:

  • fileName The code file name
  • fileNameWithoutExt The code file name without extension
    "c": [
        "gcc {fileName} -o {fileNameWithoutExt}",
    "cpp": [
        "g++ {fileName} -o {fileNameWithoutExt}",


  • The Makefile use SHELL varible in Windows (as well as PY), so if you are in Linux, change it before use make.
  • To build and upload the package, this requires these modules setuptools, wheel, twine. You can try make prepare to install these modules.
# Run
make run

make run RARG=-h # use command args

# Test
make test

# Test and get coverage
make cover

# Build
make build -B

# Install locally
make install

# Uninstall locally
make uninstall

# Clean
make clean

# Upload to PyPI
make upload

# Upload to TestPyPI
make uptest


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for edl-cr, version
Filename, size File type Python version Upload date Hashes
Filename, size edl-cr- (11.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page