formatting
This commit is contained in:
@@ -1,33 +1,28 @@
|
||||
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
|
||||
|
||||
|
||||
import freeflowuniverse.herolib.lang.python
|
||||
import json
|
||||
|
||||
import json
|
||||
|
||||
pub struct Person {
|
||||
name string
|
||||
age int
|
||||
is_member bool
|
||||
skills []string
|
||||
name string
|
||||
age int
|
||||
is_member bool
|
||||
skills []string
|
||||
}
|
||||
|
||||
mut py := python.new(name: 'test')! // a python env with name test
|
||||
// py.update()!
|
||||
py.pip('ipython')!
|
||||
|
||||
mut py:=python.new(name:'test')! //a python env with name test
|
||||
//py.update()!
|
||||
py.pip("ipython")!
|
||||
nrcount := 5
|
||||
cmd := $tmpl('pythonexample.py')
|
||||
|
||||
|
||||
nrcount:=5
|
||||
cmd:=$tmpl("pythonexample.py")
|
||||
|
||||
mut res:=""
|
||||
for i in 0..5{
|
||||
mut res := ''
|
||||
for i in 0 .. 5 {
|
||||
println(i)
|
||||
res=py.exec(cmd:cmd)!
|
||||
|
||||
res = py.exec(cmd: cmd)!
|
||||
}
|
||||
//res:=py.exec(cmd:cmd)!
|
||||
// res:=py.exec(cmd:cmd)!
|
||||
|
||||
person:=json.decode(Person,res)!
|
||||
person := json.decode(Person, res)!
|
||||
println(person)
|
||||
|
||||
Reference in New Issue
Block a user