There is a way to login to the terminal of the ubuntu core. Basically, you would have to disable console-conf and register a default user and then you could dive into the shell of your snap by using sudo snap run --shell yoursnap
where you could run your python script. However, this is not applicable since you are exposing your system to the end-user
1 Like