Is there any way to keep my Python script (with an endless \'while\' loop) running in the background on OS X? Also, for the same purpose, is there any way to have \"autorun\
Just run your Python script in the background using the shell in the usual way:
python myscript.py &
As for the autorun question, this would be a huge security hole if it was something that Mac OS X did by default, so, no, of course not. But you could easily write a script that implemented something like that on purpose: periodically look for a USB drive plugged in, and do something (even run a second script from the thumb drive) when it's plugged in.