I want to automate my python script which controls devices through CAN. I can start script simply from terminal, but I dont want to do that every time. So I put nohup python /home/pi/script.py & in rc.local - did not work. I tried putting print('1') just after import can to find out that it never happens. I even put time.sleep(60) to make sure everything loads before starting my script - still nothing. Nohup does not show '1' - only '0' which is right before import can:
import time
time.sleep(60)
print('0')
import can
print('1')