ตัวอย่างที่1
www.b4x.com
ตัวอย่างที่2
มีการimport ไลบารี่จากข้างนอกมาด้วย
1.ที่ Dos Commands ใช้คำสั่ง pip list ตรวจสอบไลบารี่ที่ถูกติดตั้งว่ามีไลบารี่อะไรบ้าง
และใช้คำสั่ง python.exe -m pip install xx
2.ในส่วน B4J Codeใช้คำสั่ง Py.importmodule()
www.b4x.com
ข้อควรจำ
Post in thread '[Solved]How to code William's PyBridge example' https://www.b4x.com/android/forum/t...williams-pybridge-example.165655/post-1015654
[PyBridge] B4J v10.2 BETA is available for download
This update includes a new library named PyBridge, that allows using Python libraries from inside the B4J app. Python is leading the way in fields such as AI, LLM, image recognition and many others. Using PyBridge is not always trivial and it won't be the right tool for every task, however there...
ตัวอย่างที่2
มีการimport ไลบารี่จากข้างนอกมาด้วย
1.ที่ Dos Commands ใช้คำสั่ง pip list ตรวจสอบไลบารี่ที่ถูกติดตั้งว่ามีไลบารี่อะไรบ้าง
และใช้คำสั่ง python.exe -m pip install xx
2.ในส่วน B4J Codeใช้คำสั่ง Py.importmodule()
B4X:
Py.ImportModule("numpy")
Py.ImportModuleFrom("scipy", "stats")
[PyBridge] B4J v10.2 BETA is available for download
This update includes a new library named PyBridge, that allows using Python libraries from inside the B4J app. Python is leading the way in fields such as AI, LLM, image recognition and many others. Using PyBridge is not always trivial and it won't be the right tool for every task, however there...
ข้อควรจำ
Post in thread '[Solved]How to code William's PyBridge example' https://www.b4x.com/android/forum/t...williams-pybridge-example.165655/post-1015654
Last edited: