Refer to this ,I 've coded as following William's example which is attached file. I have still error codea after clicked the button.
My the lastest I have edited,but I have still error code.
B4X:
Dim opt As PyOptions = Py.CreateOptions(File.Combine(File.DirApp, "C:\Python/python310/python.exe"))
Private Sub Fibonacci(n As Int) As PyWrapper
Dim Code As String = $"
#python code here
#Fibonacci numbers module
def Fibonacci(n):
result=[]
a,b=0,1
while a<n:
result.append(a)
a,b=b,a+b
return result
"$
Return Py.RunCode("Fibonacci", Array(n), Code)
End Sub
Hi al,
instead of using a string to contians the python code, is it possibile to use file and read the script from file, so to have a script of whatever complexity?
I have used python for meny years , nad i think that pybridge is a fantastic enhancement.
Thanks a lot
Hi al,
instead of using a string to contians the python code, is it possibile to use file and read the script from file, so to have a script of whatever complexity?