Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

Exec commands from python

Post Reply
alexandresgv
Posts: 3
Joined: 21.06.2019 23:40

Exec commands from python

Post by alexandresgv »

I would like to execute and terminate python functions like a concurrent process from a python script

There is a python command like pascal uo.exec('exec test()')

Code: Select all

def test2():
    while True:
        AddToSystemJournal("Test 2")
        Wait(2000)

def test1():
    while True:
        AddToSystemJournal("Test 1")
        Wait(2000)

def main():
    Exec("test1") # something like this function
    Exec("test2") # something like this function
    Terminate("test1")
    Terminate("test2")

if __name__ == '__main__':
    main()
Post Reply