Other [PyBridge] B4J v10.2 BETA is available for download

Erel

B4X founder
Staff member
Licensed User
Longtime User
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 are many things that weren't possible before and are now possible. And that is a good thing.

1739718245749.png


Other improvements:
  • Many internal libraries were updated since last release.
  • New internal keywords: Initialized and NotInitialized:
    B4X:
    If Map1 <> Null And Map1.IsInitialized Then ... 'boring
    If Initialized(Map1) Then ... 'less boring
  • #CustomBuildAction arguments are expanded with environment variables and other variables (%PROJECT%, %B4X%, %JAVABIN%, %PROJECT_NAME% and %ADDITIONAL%): https://www.b4x.com/android/forum/threads/b4x-comment-links.119897/#content
  • LogColors withs in b4xlibs
  • Fix for logs encoding issue in Java 19+. Note that the following attribute should be added for the same fix with standalone packages (if the terminal output is important):
    B4X:
    #PackagerProperty: VMArgs = -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8
  • B4XCollections: new helper methods: EmptyList, EmptyMap, MergeMaps, MergeLists, CreateList, CopyOnWriteMap and CopyOnWriteList.
  • Panel.LoadLayout no longer deletes the previous tag.
Download link: https://www.b4x.com/b4j/files/beta.exe

PyBridge is a big thing. I will write tutorials that explain how it works and how Python libraries can be wrapped to be accessed in a simple manner.
To run a simple program:

1739957471817.png



Please start a new thread for questions or issues. Use [pybridge] in the thread title if related.
 

Attachments

  • 1739719504057.png
    1739719504057.png
    15.4 KB · Views: 1,037
Last edited:

teddybear

Well-Known Member
Licensed User
B4X:
#PackagerProperty: AssemblyTitle = This is the title
It will be related to the title name of the app, or not?
B4X:
B4XPages.SetTitle(Me, "Title name")
There is no relation, AssemblyTitle is the description of the executable file, you also can see details for those properties
1.jpeg
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
After I 've tried it ,It's ok,but I can input only English. (Not be seriously)
B4X:
#Region Project Attributes
    'เพิ่มรายละเอียดของแอพที่ถูกเขียนขึ้นมา
    #PackagerProperty: AssemblyTitle = บอกชื่อไตเติ้ลของชื่อไฟล์
    #PackagerProperty: AssemblyDescription = บรรยายเกี่ยวกับไฟล์นามสกุล exe
    #PackagerProperty: AssemblyCompany = บอกชื่อบริษัทองค์กรที่สร้างแอพ
    #PackagerProperty: AssemblyProduct = บอกชื่อผลิตภัณฑ์
    #PackagerProperty: AssemblyVersion = ใส่เวอร์ชันสินค้า เช่น 1.2.3.0
    #PackagerProperty: RequireAdministrator = True
    'หมายเหตุ
    'ช่วยให้สามารถใช้ run_debug.bat utility โดยไม่ต้องเรียกร้องขอใช้สิทธิ์ใดๆ
    'เราสามารถตรวจสอบได้โดย คลิกเมาส์แป้นขวามือที่ไฟล์นาสกุล exe ที่อยู่ภายใต้โฟล์เดอร์ <ที่อยู่การจัดเก็บของแต่ละคน>\B4J\Objects\temp\build
    'แล้ว เลือก Properties-details
  
    #MainFormWidth: 600
    #MainFormHeight: 600
  
#End Region
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
I'm sorry that I've found my problem is
B4X:
 #PackagerProperty: AssemblyVersion =  1.2.3.0  '<= Must be only numberic
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Umm is it just me or is the download link in post#1 still giving beta#3 when clicked?
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
Beta #4 is released.

PyBridge v0.7 and XUI Views v2.65 are included.
Is there way we only clicked,B4J has automatically do the command pip install the python's library without type pip install xx ourselves?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Is there way we only clicked,B4J has automatically do the command pip install the python's library without type pip install xx ourselves?
Maybe in the future. Overall it is quite simple. You just need to ctrl+click the link and paste the command. And it does let the developer manage the libraries.
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Confused - used link in #50 but it still reports Beta#3 (is it just the 'About' that's wrong?)
 
Upvote 0

Almeida

New Member
The "about" is correct and it should be the correct file this time. I double checked.

Maybe your browser cached the previous file? The installer size should be 35,812,640 bytes
As the same happens. I've already cleared the cache, several installations but it's still in beta#3
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Ok, sorted - smartscreen didnt like the file - so I turned that off, OS didnt like the file install - told it to allow, then A/V had to scan it - finally it let me open it.

(FYI - Edge hates generic names for files like beta.exe)
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
There is a small option there to "run anyway".
for some reason it made no difference. I am curious as to where it got the beta.exe to install (the wrong one) as I had cleared cache (forever) and manually deleted all 'beta.exe's from my file system. I have a sneaky suspicion One Drive had a hand in this.
On the plus side it never triggered the 'ScareWare' to show.
 
Upvote 0

mcqueccu

Well-Known Member
Licensed User
Longtime User
This will happen for some time because it is signed with a new signing key. There is a small option there to "run anyway".
I had the SmartScreen issue, But Run Anyway didn't come. Renamed from beta.exe to B4J v10.2 beta.exe and still could not run.

I had to redownloaded using Internet Download Manager before I was able to install.
1741612958826.png
 
Upvote 0
Top