B4J Question pip install - Usage

T201016

Active Member
Licensed User
Longtime User
Hi, I'm looking for help 😓
When testing the project, I have no idea where I should place the file "win11taast.py" module
- Before its installation? I assume that pybridge is properly installed.
I will be grateful for any tips.

Use:
Open global Python shell or Open local Python shell:

pip install win11toast

ERROR: Could not find a version that satisfies the requirement win11toast (from versions: none)
ERROR: No matching distribution found for win11toast

Error occurred on line: 47 (B4XMainPage)
(b4xmainpage._vvvv0) - Python Error (ModuleNotFoundError) - Method: module.exec: No module named 'win11toast'
PyBridge disconnectedUse:
 

Attachments

  • Windows11Toast.zip
    171.1 KB · Views: 36
Solution
Got your code working. Few minor changes (just how I code)
You dont need pip install win11toast.py - I put it in files folder
B4X:
Private Sub ShowNotification(Title As String, Body As String, AppId As String) As ResumableSub
    wait for (Py.RunCode("toast",Array(Title,Body,AppId),File.ReadString(File.DirAssets,"win11toast.py")).Fetch) Complete (res As PyWrapper)
    Return res.value
End Sub

Didnt attempt the callback sub

Daestrum

Expert
Licensed User
Longtime User
Got your code working. Few minor changes (just how I code)
You dont need pip install win11toast.py - I put it in files folder
B4X:
Private Sub ShowNotification(Title As String, Body As String, AppId As String) As ResumableSub
    wait for (Py.RunCode("toast",Array(Title,Body,AppId),File.ReadString(File.DirAssets,"win11toast.py")).Fetch) Complete (res As PyWrapper)
    Return res.value
End Sub

Didnt attempt the callback sub
 
Upvote 1
Solution

T201016

Active Member
Licensed User
Longtime User
Witaj @Daestrum
Ocaliłeś mi pół dnia - dziękuję.
Nie sądziłem, że można też kodować w ten sposób ...
 
Upvote 0
Top