0

I have had a look around but cant find a definitive answer to my question.

I have a .py script which does a basic file copy from one directory to another but I want to run it on a Raspberry Pi using a little 2.8" touch screen. so I was thinking if I could build a basic HTML page which will load up when the RPi boots I could then just press the option I want ie: SD > HDD or HDD > NAS

The RPi can have a web server running if need be or something simple like LAMP

I have seen some people try to do this but there scripts are a lot more complex than mine.

If this is possible can someone point me in the right direction if it isn't possible then I'll need to look at finding a python ui coder

Adam

Adam Mann Pro
  • 255
  • 1
  • 3
  • 12
  • Have you checked [here](https://docs.python.org/2/howto/webservers.html) or [here.](http://stackoverflow.com/questions/5615228/call-a-python-function-within-a-html-file) How about [this](http://karrigell.sourceforge.net/en/pythoninsidehtml.html) one? – Kyle Jun 24 '14 at 16:02
  • Hi, its kind of what I have been looking at already but will further research into the links provided – Adam Mann Pro Jun 24 '14 at 16:12

1 Answers1

0

You can use flask it's a simple microframework for Python http://flask.pocoo.org/ if you want to go with HTML UI. A more compact solution is webkit python bindings like http://www.aclevername.com/articles/python-webgui/ to provide a single python app (no need to serve then open browser)

If you don't really need HTMl check something like PyQT https://wiki.python.org/moin/PyQt or TkInter https://wiki.python.org/moin/TkInter

Issam Zoli
  • 2,724
  • 1
  • 21
  • 35
  • HTML is an option as I can do this, creating a GUI would be preferable as a standalone app would work better as i wouldn't need to have the web server running in the backkground, ill have to look into PyQT and TKinter – Adam Mann Pro Jun 24 '14 at 16:24
  • HTML is good for complex interactive UIs whom generally harder to craft using native GUI tools. If your UI is simple don't go that far. – Issam Zoli Jun 24 '14 at 16:28
  • I would also suggest bottle.py. It is a single file which can do basically everything flask can, and seems to be well suited for something this simple. – Dan Hogan Jun 24 '14 at 18:47