Documentation
¶
Overview ¶
Package cli implements the CLI functionality, main defers execution to the exported methods in this package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Stdout io.Writer // Normal CLI output Stderr io.Writer // Where the logger and errors will write to Logger *logrus.Logger // The debug logger Path string // The path to search through i.e. $PATH, passable field to facilitate testing }
App represents the py program.
func (*App) Launch ¶
Launch will follow py's control flow and launch whatever is the most appropriate python any arguments specified in 'args' will be passed through to the found python Control flow for no args is:
- Activated virtual environment
- .venv directory
- venv directory
- Look for a python shebang line in the file (if we have a file)
- PY_PYTHON env variable
- Latest version on $PATH
func (*App) LaunchExact ¶
LaunchExact will search through $PATH, find the latest python interpreter satisfying the constraint imposed by both 'major' and 'minor' version passed launch it, and pass through any args passed to it.
func (*App) LaunchLatest ¶
LaunchLatest will search through $PATH, find the latest python interpreter and launch it, passing through any arguments passed to it.
func (*App) LaunchMajor ¶
LaunchMajor will search through $PATH, find the latest python interpreter satisfying the constraint imposed by 'major' version passed launch it, and pass through any arguments passed to it.