Go to advanced search

by Isturite
Sat Oct 10, 2015 8:59 pm
Forum: Advanced users
Topic: Printing to file every x seconds
Replies: 4
Views: 822

Re: Printing to file every x seconds

import threading def printit(): threading.Timer(30.0,printit).start() print "Hello" printit() I cant seem to combine the two though. Does anyone have any suggestions? You are using the module incorrectly. Timer() is a class and an object instance of it must be created in order for you to use the st...
by Isturite
Thu Oct 08, 2015 6:14 pm
Forum: Teaching and learning resources
Topic: Get a total beginner setup & learning to program wo internet
Replies: 7
Views: 2307

Re: Get a total beginner setup & learning to program wo inte

There are many python books that are available for very cheap or for free as a PDF. I recommend this website, you can buy the books, or get a pdf for free, or give a donation. Also there are many python books specific to raspberry pi you can find. https://inventwithpython.com/ p.s. - do note that th...
by Isturite
Thu Oct 08, 2015 5:49 pm
Forum: Advanced users
Topic: Printing to file every x seconds
Replies: 4
Views: 822

Re: Printing to file every x seconds

I would use a while loop and the 'time' module.

Code: Select all

import time
file = open("/home/pi/Music player/log","w")
while True:
     file.write("Test")
     time.sleep(30)
file.close
by Isturite
Thu Oct 08, 2015 5:45 pm
Forum: Troubleshooting
Topic: How to change keyboard language layout?
Replies: 30
Views: 225454

Re: How to change keyboard language layout?

walterbyrd wrote:This does not work for me. I keep getting "command not found"
I have to use 'sudo -s raspi-config'

Go to advanced search