Go to advanced search

by drifterf
Mon Aug 05, 2019 4:35 pm
Forum: General discussion
Topic: Large Raspberry Pi Case
Replies: 2
Views: 247

Large Raspberry Pi Case

Hi, hope this is in the right section. im looking for a case for a pi 3 thats bigger than the normal one, i want to house some of the relay modules etc inside it. i have been just ordering a containment box and building it with pcb stand off etcs. didnt know if anyone knew of a case that has mounts ...
by drifterf
Sun Aug 04, 2019 3:16 pm
Forum: Python
Topic: Running Python Scripts From A Html
Replies: 36
Views: 1047

Re: Running Python Scripts From A Html

no one help with this ? so close but stuck at moment, been trying all day for something im sure is simple :(
by drifterf
Sun Aug 04, 2019 12:43 pm
Forum: Python
Topic: Running Python Scripts From A Html
Replies: 36
Views: 1047

Re: Running Python Scripts From A Html

Brackets come in pairs. thank you, im such a dumbass (should of put me contact lenses in lol) this works great now except it dosent launch my .py script in the handler ? it redirects to the page i require but dosent actually launch the .py script (opendoor2.py) import tornado.ioloop import tornado....
by drifterf
Sun Aug 04, 2019 8:45 am
Forum: Python
Topic: Running Python Scripts From A Html
Replies: 36
Views: 1047

Re: Running Python Scripts From A Html

thank you, i now get this error for some reason. have i done something wrong ? File "server.py", line 19 pid = subprocess.Popen["python", "opendoor2.py"]).pid ^ SyntaxError: invalid syntax import tornado.ioloop import tornado.web import subprocess class MainHandler(tornado.web.RequestHandler): def g...
by drifterf
Sun Aug 04, 2019 7:53 am
Forum: Python
Topic: Running Python Scripts From A Html
Replies: 36
Views: 1047

Re: Running Python Scripts From A Html

Hi everyone, sorry to bring my head back up after all your help lol i am getting into the tornado stuff now and starting to understand it a bit more. how would it be possible to open a .html file i have already created when the "Release Door" link is pressed? the current code is below import tornado...
by drifterf
Sun Aug 04, 2019 6:24 am
Forum: Python
Topic: Running Python Scripts From A Html
Replies: 36
Views: 1047

Re: Running Python Scripts From A Html

ok,, i have been messing around and not can get a gpio to trigger from a web button so i will continue to mess around

i would like to thank everyone for the help !
by drifterf
Sat Aug 03, 2019 5:51 pm
Forum: Python
Topic: Running Python Scripts From A Html
Replies: 36
Views: 1047

Re: Running Python Scripts From A Html

ok so i forgot to add import subprocess lol but now i get this pi@raspberrypi:~ $ sudo python html.py WARNING:tornado.access:404 GET /favicon.ico (::1) 2.13ms ERROR:tornado.application:Uncaught exception GET /sample (::1) HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/...
by drifterf
Sat Aug 03, 2019 5:19 pm
Forum: Python
Topic: Running Python Scripts From A Html
Replies: 36
Views: 1047

Re: Running Python Scripts From A Html

once again im sorry, i currently now get this when i click the web button with the code i have attached. pi@raspberrypi:~ $ sudo python html.py WARNING:tornado.access:404 GET /favicon.ico (::1) 1.80ms ERROR:tornado.application:Uncaught exception GET /sample (::1) HTTPServerRequest(protocol='http', h...
by drifterf
Sat Aug 03, 2019 4:13 pm
Forum: Python
Topic: Running Python Scripts From A Html
Replies: 36
Views: 1047

Re: Running Python Scripts From A Html

thank you once again for helping but im new to this and still confused. could you show me a modified code that would launch a .py on clicking the link. hopefully then i can see what to change and why, thank you again
by drifterf
Sat Aug 03, 2019 11:14 am
Forum: Python
Topic: Running Python Scripts From A Html
Replies: 36
Views: 1047

Re: Running Python Scripts From A Html

thank you for your help again, something like i done below ? i changed this part def post(self): import subprocess self.set_header("Content-Type", "text/plain") self.write("You wrote " + self.get_body_argument("message")) subprocess.run("python3 test1.py", shell=True) import tornado.ioloop import to...
by drifterf
Sat Aug 03, 2019 10:41 am
Forum: Python
Topic: Running Python Scripts From A Html
Replies: 36
Views: 1047

Re: Running Python Scripts From A Html

unfortunately there is the python2-python3 confusion. For python3, install and run with # recommended, as Tornado 6.0 requires Python 3.5.2 sudo pip3 install tornado python3 tornado1.py should of known that lol, much appreciated !! how would i link the "a sample link" button to launch a .py script ...
by drifterf
Sat Aug 03, 2019 10:09 am
Forum: Python
Topic: Running Python Scripts From A Html
Replies: 36
Views: 1047

Re: Running Python Scripts From A Html

i get the following error, i have used pip install tornado

sudo python tornado1.py
Traceback (most recent call last):
File "tornado1.py", line 1, in <module>
import tornado.ioloop
File "/home/pi/tornado.py", line 1, in <module>
ImportError: No module named ioloop
by drifterf
Fri Aug 02, 2019 6:09 pm
Forum: Python
Topic: Running Python Scripts From A Html
Replies: 36
Views: 1047

Re: Running Python Scripts From A Html

so with the above i can create a html with a link to the .py and it will launch it ?
by drifterf
Fri Aug 02, 2019 4:13 pm
Forum: Python
Topic: Running Python Scripts From A Html
Replies: 36
Views: 1047

Running Python Scripts From A Html

Hi everyone, suppose its a simple enough question, i hope the answer is just as simple lol. so i have a few python scripts on the pi which do differnt things. i want to create a webpage local on the pi (with apache i suppose) that when a simple link is clicked it launchs and runs the script as if yo...
by drifterf
Tue Jul 23, 2019 3:27 pm
Forum: Python
Topic: Update a file from usb with a GPIO button
Replies: 5
Views: 252

Re: Update a file from usb with a GPIO button

this is great, i will have a read through and let you know my results. doing away with the button is even better !
by drifterf
Tue Jul 23, 2019 11:58 am
Forum: Python
Topic: Update a file from usb with a GPIO button
Replies: 5
Views: 252

Re: Update a file from usb with a GPIO button

Hi, this is not a option for this project. i need to put a csv file on a memory stick, take it to the pi, plug in, press a physical button so it copys and overwrites the old file
by drifterf
Mon Jul 22, 2019 5:01 pm
Forum: Python
Topic: Update a file from usb with a GPIO button
Replies: 5
Views: 252

Update a file from usb with a GPIO button

Hi guys. so i have a project which works fine and trying to adapt it a bit. current the pi is running a access control proximity reader through reading a CSV file. accepted codes trigger a pin which fires a relay and opens the automatic gate. we currently goto the pi locally and update the csv file ...
by drifterf
Wed Jul 17, 2019 4:30 pm
Forum: Python
Topic: only read a certain length of a output
Replies: 9
Views: 449

Re: only read a certain length of a output

thank you for the advise :)
by drifterf
Tue Jul 16, 2019 4:14 pm
Forum: Wanted
Topic: Assist In python and peewee setup
Replies: 2
Views: 2492

Re: Assist In python and peewee setup

will email now mate, thank you
by drifterf
Tue Jul 16, 2019 5:26 am
Forum: Python
Topic: write python output to a excel field
Replies: 3
Views: 282

Re: write python output to a excel field

thank you i will have a read
by drifterf
Mon Jul 15, 2019 6:07 pm
Forum: Python
Topic: write python output to a excel field
Replies: 3
Views: 282

Re: write python output to a excel field

current script that accepts codes alredy programmed in the csv or denies if they are not #!/usr/bin/env python import pigpio, csv FILE_TO_READ = '/home/pi/furniss_acu/database/database.csv' CSV_ID_KEY = 'Number :' class decoder: """ A class to read Wiegand codes of an arbitrary length. The code leng...
by drifterf
Mon Jul 15, 2019 6:05 pm
Forum: Python
Topic: write python output to a excel field
Replies: 3
Views: 282

write python output to a excel field

hi, i currently have a script that when a proximity fob is presented to the reader it displays the fob number (PIGPIO wiegand script) i would like to make a python script so when i run it and then present the access fob it automatically puts the output into the next un-used column of the csv file. c...
by drifterf
Mon Jul 15, 2019 5:40 pm
Forum: Python
Topic: only read a certain length of a output
Replies: 9
Views: 449

Re: only read a certain length of a output

pi@raspberrypi:~ $ apt-cache policy python3-pigpio python3-pigpio: Installed: 1.68-3+rpi1 Candidate: 1.68-3+rpi1 Version table: *** 1.68-3+rpi1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages 100 /var/lib/dpkg/status pi@raspberrypi:~ $ apt-cache policy python-pigpio pytho...
by drifterf
Mon Jul 15, 2019 5:02 pm
Forum: Python
Topic: only read a certain length of a output
Replies: 9
Views: 449

Re: only read a certain length of a output

hi, thank you

i believe it is installed as it tells me i am on version 68 i believe
by drifterf
Mon Jul 15, 2019 4:47 pm
Forum: Python
Topic: only read a certain length of a output
Replies: 9
Views: 449

Re: only read a certain length of a output

also sorry to jump on you joan but could you help with this (env) pi@raspberrypi:~/acu $ python main.py Traceback (most recent call last): File "main.py", line 1, in <module> from acu.app import App File "/home/pi/acu/acu/app.py", line 2, in <module> import pigpio ModuleNotFoundError: No module name...

Go to advanced search