test a script

exec("import time\np=machine.Pin(25,machine.Pin.OUT)\nwhile 1:\n\tp.high()\n\ttime.sleep_ms(100)\n\tp.low()\n\ttime.sleep_ms(100)")
		

save it to main.py

>>> f = open("main.py","w")
>>> f.write("import time\np=machine.Pin(25,machine.Pin.OUT)\nwhile 1:\n\tp.high()\n\ttime.sleep_ms(100)\n\tp.low()\n\ttime.sleep_ms(100)")
113
>>> f.close()
		

reboot