installers.lang.python #
python
To get started
import freeflowuniverse.herolib.installers.something.python as python_installer
heroscript:='
!!python.configure name:'test'
password: '1234'
port: 7701
!!python.start name:'test' reset:1
'
python_installer.play(heroscript=heroscript)!
//or we can call the default and do a start with reset
//mut installer:= python_installer.get()!
//installer.start(reset:true)!
example heroscript
!!python.configure
homedir: '/home/user/python'
username: 'admin'
password: 'secretpassword'
title: 'Some Title'
host: 'localhost'
port: 8888
Constants #
const version = '3.12.0'
fn get #
fn get(args_ ArgsGet) !&Python
fn heroscript_dumps #
fn heroscript_dumps(obj Python) !string
///////////NORMALLY NO NEED TO TOUCH
fn heroscript_loads #
fn heroscript_loads(heroscript string) !Python
fn play #
fn play(args_ PlayArgs) !
fn switch #
fn switch(name string)
switch instance to be used for python
struct ArgsGet #
@[params]
struct ArgsGet {
pub mut:
name string
}
///////FACTORY
struct DefaultConfigArgs #
@[params]
struct DefaultConfigArgs {
instance string = 'default'
}
helpers
struct InstallArgs #
@[params]
struct InstallArgs {
pub mut:
reset bool
}
struct PlayArgs #
@[params]
struct PlayArgs {
pub mut:
heroscript string // if filled in then plbook will be made out of it
plbook ?playbook.PlayBook
reset bool
}
struct Python #
@[heap]
struct Python {
pub mut:
name string = 'default'
}
THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
fn (Python) destroy #
fn (mut self Python) destroy() !
fn (Python) install #
fn (mut self Python) install(args InstallArgs) !