title: Run Script in Foreground On Boot Raspberry Pi
body: <p>I've a script to run on boot and I'd like to use the keyboard to interact with the script. I've successful set this up to run in crontab; however, the script runs in the background and I can't use the keyboard to interact with the script. Here's a simplified example of the script:</p>
  
  <pre><code>def write_to_txt(item_to_write):
      with open("my_txt_file.txt", "a") as myfile:
          myfile.write('\n'+str(item_to_write))
  
  while True:
      keys_to_enter = raw_input()
      write_to_txt(keys_to_enter)
  </code></pre>
  
  <p>Please could someone point me in the right direction? </p>