@gnome/python-cli@0.1.1Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
gnomejs/python-cliThe python-cli module provides a simple way to execute python scripts or files.
This package works with Node.js, Deno, Bun


JSR Score
100%
Published
a year ago (0.1.1)
The python-cli
module provides a simple way to execute
python scripts or files.
The module relies upon the @gnome/exec module and
has the same basic usage as the Command
and ShellCommand
class.
Basic Usage
import { pythonScript, python } from "@gnome/python-cli"; const cmd = await pythonScript("print('Hello, World!')"); console.log(await cmd.text()); console.log(cmd.code); console.log(await pythonScript("print('Hello, World!')").text()); console.log(await pythonScript("test.py").text()); console.log(await python(["test.py"]).text()) console.log(await python(["-V"]).text()); // runs python script and writes directly to console await pythonScript("print('I am alive')").run();
Built and signed on
GitHub Actions
Add Package
deno add jsr:@gnome/python-cli
Import symbol
import * as python_cli from "@gnome/python-cli";
Import directly with a jsr specifier
import * as python_cli from "jsr:@gnome/python-cli";
Add Package
pnpm i jsr:@gnome/python-cli
pnpm dlx jsr add @gnome/python-cli
Import symbol
import * as python_cli from "@gnome/python-cli";
Add Package
yarn add jsr:@gnome/python-cli
yarn dlx jsr add @gnome/python-cli
Import symbol
import * as python_cli from "@gnome/python-cli";
Add Package
vlt install jsr:@gnome/python-cli
Import symbol
import * as python_cli from "@gnome/python-cli";
Add Package
npx jsr add @gnome/python-cli
Import symbol
import * as python_cli from "@gnome/python-cli";
Add Package
bunx jsr add @gnome/python-cli
Import symbol
import * as python_cli from "@gnome/python-cli";