[บทเรียน, B4J] การนำโค้ด Pythonมาใช้งานB4J(PyBridge)

Theera

Expert
Licensed User
Longtime User
ตัวอย่างที่1

ตัวอย่างที่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")

ข้อควรจำ

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:
Top