Skip to content

Embedded Code Blocks

Rajesh Gautam edited this page Jun 12, 2026 · 1 revision

Embedded Code Blocks

Use otherCoding to run code written in another language directly inside a Curl program.

Syntax

otherCoding{"Language",

your code here

}\

The closing }\ must be on its own line.


Python

otherCoding{"Python",

import math
print(math.sqrt(144))
print(math.pi)

}\

Python variables are shared with Curl — you can set a variable in the Python block and access it in Curl:

otherCoding{"Python",

result = 2 ** 10
print(result)

}\

JavaScript

Requires Node.js to be installed.

otherCoding{"JavaScript",

console.log("Hello from JavaScript!")

}\

Supported Languages

Language Status
Python Fully supported
JavaScript / Node.js Supported (requires Node.js)
Java Not supported at runtime
C Not supported at runtime
C++ Not supported at runtime

Clone this wiki locally