Hi,
currently I am using B4J on my raspberry.
I am using Shell to execute python scripts and get the output, but here is the problem: I didn't get any output ...
Example test.py:
B4J code:
I hope someone can help me
Have a nice weekend
Jan
currently I am using B4J on my raspberry.
I am using Shell to execute python scripts and get the output, but here is the problem: I didn't get any output ...
Example test.py:
B4X:
import time
while True:
print("test")
time.sleep(1)
B4J code:
B4X:
Sub StartTest
Dim shl As Shell
shl.Initialize("shl","python",Array("/.../.../test.py"))
shl.RunWithOutputEvents(-1)
End Sub
Sub shl_StdOut (Buffer() As Byte, Length As Int)
Dim Output As String = BytesToString(Buffer,0,Length,"UTF-8")
Log(Output)
End Sub
Sub shl_StdErr (Buffer() As Byte, Length As Int)
Dim Output As String = BytesToString(Buffer,0,Length,"UTF-8")
Log(Output)
End Sub
I hope someone can help me
Have a nice weekend
Jan