Attaching Python Code

How do I do this?
.py and .txt are not accepted and the code is really too long to insert in the post.

Probably way simpler to just host it externally and link it - pastebin.com/ are two options…

Thanks didn’t know either of them but I have signed in tohttps://pastebin and put my code up there.
I wanted it available to try and get an answer to another post:https://forum.volumio.org/status-t14261.html

Just a heads up - I don’t see the code linked anywhere :wink: