As per the man page for openbox, you need to rename the startup script as autostart.sh
and also make it executable using
chmod +x ~/.config/openbox/autostart.sh
.
Finally, ensure you put an & sign at the end of the command.
python ~/t.py &
inside the autostart.sh
file.