Enable the Python script

Use the following AT command:

AT#ESCRIPT=“<script_name>“

where

<script_name>: script name to be executed

 

Using the AT#ESCRIPT command select the Python script which will be executed from the next start-up and in every future start-up or after AT#EXECSCR command. It can be either a .py Python script or a .pyc compiled Python script. In case the application consists of more than one file only the main script must be enabled for execution.

 

When selecting the script to enable between the ones downloaded to the module:

AT#LSCRIPT - can help checking the names of the scripts;

AT#ESCRIPT? - can help checking the name of the script that is enabled at the moment.

Note: There is no error return value for non-existing script name in the module memory typed in command AT#ESCRIPT. For this reason it’s recommended to double check the name of the script that you want to execute. On the other hand this characteristic permits additional possibilities like enabling the Python script before downloading it on the module or not having to enable the same script name every time the script has been changed, deleted and replaced with another script but with the same name.

Type for example

AT#ESCRIPT=”a.py”

Wait for the result: OK or ERROR.