Modify the PyScripter Default Template

For Python scripting I have come to rely on PyScripter as my editor of choice. With code assist and an interactive interpreter built right into the same dialog, it makes putting together scripts much easier.

PyScripter MenuPyScripter includes another nice feature when creating a new file. It has a handy template used to get you started quickly when creating a new script. This worked pretty well for me, but I wanted to make a few changes to it. Notably, I typically put a GNU License in my scripts and I wanted this to be included by default. This is accomplished easily enough in PyScripter by going to Options > Tools > File Temmplates to open the template editor.

Select Python ScriptWith this editor open, to change how my Python template script looks, you need to select Python Script, make my modifications, click the Update button and close the dialog by clicking OK. At the top of the dialog, first make sure the template you are editing is the right script type. For what I typically work with this is the first one in the list, Python Scripts.

Editor DialogOnce the Python Script is selected, the bottom of the dialog populates with the existing script. In this area, make the changes. For me, this consisted of including the GNU Public License, changing the date format, and hard coding my name into the template.

Update ButtonFinally, and this is important, make sure you click the Update button to commit your changes before clicking the OK button to close the dialog. If you do not, your changes will not be saved.

This is all there is to it. Have fun!