Add support for PyBox android#293
Open
m-anshuman2166 wants to merge 1 commit intoasweigart:masterfrom
Open
Conversation
Author
|
Further clarifying on PyBox - It is a python learning and development environment for android which is nearing its release within next few months. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Android (PyBox) clipboard support to pyperclip
This PR adds native clipboard support for Android devices running the PyBox Python environment.
Changes
init_android_pybox_clipboard()- implementscopyandpasteusing PyBox'sClipboardReceiverbroadcast APIdetermine_clipboard()- checks forAndroidplatform andcom.vytros.pyboxinsys.executableHow it works
On Android, standard clipboard mechanisms like
xclip,pbcopy, or Windows clipboard APIs are unavailable. PyBox exposes aBroadcastReceiverthat handles clipboard get/set operations. pyperclip communicates with it viaam broadcastwith the required--user 0,stderr=stdoutandstdin=DEVNULLflags to bypass Android SELinux restrictions on untrusted app processes.Testing
pyperclip.copy()andpyperclip.paste()both working as expectedDemo
Screen_recording_20260307_153144.mp4
Note
The PyBox Project not yet public, but is scheduled to launch within next few months. Since
pyperclipis a part of our templates, we require support out of the box.This implementation has been tested from Android 8.0 to Android 16
Regards