Brython and Browser Extensions

57 views
Skip to first unread message

Andreas

unread,
Dec 14, 2017, 4:44:22 AM12/14/17
to brython
Hello, I believe it would make sense for guides to be provided on the Brython website for how it can be used to create browser extensions. There is already one tutorial but all it shows is how to embed the console in an iframe, not what is needed. Would love to know what you think. Thanks.

Jonathan Verner

unread,
Dec 15, 2017, 9:18:49 AM12/15/17
to brython
It would definitely make sense, but someone will need to write them. I currently don't have time to do that. Also, it is my impression, that using Brython in WebExtensions will not be completely trivial. See also https://github.com/brython-dev/brython/issues/713.

Jonathan Verner

unread,
Jan 7, 2018, 6:40:14 PM1/7/18
to brython
Also, it is my impression, that using Brython in WebExtensions will not be completely trivial. See also https://github.com/brython-dev/brython/issues/713.

Actually, I was probably wrong about it being difficult. As a weekend project I hacked together a very crude extension to add a Python console to Browser's Dev Tools. I'll see if I have more time to work on it and document the process, but in the meanwhile, you can look at the code here: https://gitlab.com/Verner/PythonConsoleExtension. Its all really just a matter of including brython.js, and brython_stdlib.js in your extension and you should be good to go.
Reply all
Reply to author
Forward
0 new messages