Skip to main content

Tool to expand C++ includes targeting competitive programmers.

Project description

Exinc

Tool to expand C++ includes for competitive programmers.

Installation

From pip:

$ pip install exinc

From source:

$ pip install .

Configuration

Run the tool one first time for it to create a default configuration.

$ exinc --help

Now you'll find a configuration file in /home/$USER/.exinc that you can edit.

Usage

First, you have to properly place the files you want to include. You should either:

  1. Put them in the same folder of your to-be-compiled source code;
  2. Or put them somewhere, and add such path to DEFAULT_PATHS in the .exinc configuration file.

Notice that when you go with (2), you also have to make sure you add this path to other places of interest. For instance, when using vscode, you also want to make sure IntelliSense will recognize these headers.

Now, you can write C++-based solutions and use your newly available includes:

// MyIncludedCode.cpp
int included_function() {
  return 42;
}
// solution.cpp
#include "MyIncludedCode.cpp"
#include <bits/stdc++.h>

int32_t main() {
  cout << included_function() << endl;
  // Code should compile, and print 42.
}

Ultimately, this code will be expanded by Exinc to:

// solution.pre.cpp
int included_function() {
  return 42;
}
#include <bits/stdc++.h>

int32_t main() {
  cout << included_function() << endl;
  // Code should compile, and print 42.
}

Project details


Download files

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

Source Distribution

exinc-1.0.3.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exinc-1.0.3-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file exinc-1.0.3.tar.gz.

File metadata

  • Download URL: exinc-1.0.3.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/23.5.0

File hashes

Hashes for exinc-1.0.3.tar.gz
Algorithm Hash digest
SHA256 7e3f55937d84566d45f0dbbe2e06b1c4f63a2712ca443d37fa02e40819bdc2dd
MD5 77554f1b502743d3eafedca7874b2f33
BLAKE2b-256 4e54cec093e1f2fa34791657abd302b7e0876a041ed8003a0c6247007d3edbc8

See more details on using hashes here.

File details

Details for the file exinc-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: exinc-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/23.5.0

File hashes

Hashes for exinc-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f6b99687dc331cb4056759da035cdecc5dde5ea5b26b033338ca41db781ce8d0
MD5 d20866ad72b4462596c789e0b27a1c10
BLAKE2b-256 1f91436830f17341f99a8d530f2be6f0e74e56d3f94c7e06badefa18f0287fb8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page