Create a python file that only contains this function
def increase_by_one(i):
# this increments i
f=open(__file__).read()
st=f[28:-92][0]
return i+f.count(st)
Then you can import this function and it will raise an index error if the comment is not there, coming close to the most literal way
Any code which does not contain the comment “this increments i:” will produce a compile error and fail to run.
could be interpreted in python
You might want to check out https://gpslogger.app/ for logging. I’m super happy with the battery usage. My use case is on multiday tracks, so battery charge is a luxury.