psanch
Posts: 4
Joined: Mon May 12, 2014 2:06 pm

Auto run a python script at boot

Tue May 13, 2014 12:53 pm

I have a python script that runs every time pi boots. Unfortunately it requires a keyboard event to function properly. This doesn't work since the script seems to run only in the background. Is it possible to change that or, alternately send keyboard inputs to a program running in the background?

User avatar
DougieLawson
Posts: 39303
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Auto run a python script at boot

Tue May 13, 2014 1:18 pm

That's the definition of foreground vs background.

Foreground interacts with the keyboard operator. Background runs autonomously with no externals.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
RaTTuS
Posts: 10563
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Auto run a python script at boot

Tue May 13, 2014 1:42 pm

edit the python source and remove the keyboard input ?
or pipe input into it
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Return to “Beginners”