PasteScript
raw JSON → 3.7.0 verified Fri May 01 auth: no python maintenance
PasteScript is a pluggable command-line frontend, including commands to setup package file layouts. Current version 3.7.0, supports Python >=3.8. Release cadence is low; it is in maintenance mode.
pip install pastescript Common errors
error No module named pastescript ↓
cause The installed package 'pastescript' does not provide a top-level module named 'pastescript'; it installs as 'paste.script'.
fix
Use 'import paste.script' instead of 'import pastescript'.
error ImportError: cannot import name 'PasteScriptCommand' from 'pastescript' ↓
cause Trying to import from the wrong module name.
fix
Use 'from paste.script.command import PasteScriptCommand'.
Warnings
deprecated PasteScript is in maintenance mode; consider using its successor 'pastescript3' or alternatives like 'click' for new projects. ↓
fix Use 'pastescript3' or migrate to a different CLI framework.
breaking Python 3.8+ required; Python 2 and older versions of Python 3 are no longer supported. ↓
fix Upgrade to Python 3.8 or later.
gotcha Importing 'pastescript' directly instead of 'paste.script' leads to ModuleNotFoundError. ↓
fix Use 'import paste.script' or 'from paste.script import ...' as the package installs as a namespace part of 'paste'.
Imports
- PasteScript wrong
import pastescriptcorrectimport paste.script - PasteScriptCommand wrong
from pastescript import PasteScriptCommandcorrectfrom paste.script.command import PasteScriptCommand
Quickstart
from paste.script.command import PasteScriptCommand
import os
# Example: run a simple command
cmd = PasteScriptCommand()
cmd.run(['paster', '--version'])