How to save python script as .py file?

Ello !

Could You write me how to save python script that can be found in the internet (like this one --> )
as .py file that I can open in blender as an addon ?

I copied whole text to notepad/ wordpad and saved it as with ANSI coding. Then I tried to install it as an addon but blender didn’t do anything -no file to “check” appeared.

Then I copied this source text directly to blender text window an pressed “run script” -an erro appeared.
Also I tried to save this text as .py by saving it in blender: Text --> Save/ Save as - but it didnt helped.

Please help and explain why is it so ?

Copy that code to Notepad or whatever text editor, save as “” (in case of notepad, actually type in the quote marks, or it will save it as, then go to user prefs in blender, install as addon and select the py file.

The python Versions matter. If you are trying to execute python 2.x when Blender uses 3.x python, you’ll get the error. You can also test your python script and see your errors by starting blender from a CLI / CMD prompt which blender refers to as a “console”


I just tried what you said and it worked great. I was having a problem with Blender recognizing the .txt file so I made it .py file and it worked. I was trying to install the “Screencast Key Status Tool” but couldn’t get it installed. I did what you said and now it’s there.