The Stack Overflow podcast is back! Listen to an interview with our new CEO.
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 9050

Python is a general-purpose, dynamically typed, object-oriented high-level programming language. Interpreters for versions 3.x and 2.x come installed on the Raspberry Pi's most popular operating system distributions.

5
votes
Aparently, the python3-matplotlib package is not available on wheezy, but on jessie. You could install it from there, but it involves a bit of dark magic with apt, and I think a better option would be …
answered Apr 25 '14 by Bex
0
votes
You might want to research service. You can create an init script that is a part of the system's init, and put it at an appropriate runlevel. Run man service. Here is a guide to creating init script …
answered Mar 1 '15 by Bex
0
votes
Python 3 is not backward compatible. Code written in one version will have to be ported to the other. You can not expect that code developed in Python 2 to be runnable in Python 3, or the other way … around. See to that your development environment and your production environment run the same version on Python, down to the last decimal. …
answered Mar 8 '15 by Bex
2
votes
Yes, the script is still running som the session you had - no, it does not stop when you open a new connection. You can't really access that session from another one, but you can manipulate what it's …
answered Jul 16 '14 by Bex
1
vote
Can be done with ttyas well, like this: import tty, sys tty.setraw(sys.stdin.fileno()) while 1: ch = sys.stdin.read(1) if ch == 'a': print "Wohoo" This will garble your tty, though …
answered Mar 6 '15 by Bex
1
vote
Have a look at the os.system() call.
answered Mar 3 '16 by Bex
1
vote
You need to close the stream. The object you named stream is a ByteIO, that in turn is-a IOBase. It should be closed to ensure proper release and clean-up. You need a condition in your loop, and when …
answered Feb 11 '15 by Bex
2
votes
pymedia is quite old and not very active anymore. If at all possible, I would try to switch to pygame. Pygame is versatile, modern and active. I haven't tried to do exactly what you want to do, but I …
answered Apr 20 '14 by Bex
1
vote
read it, and then run man 5 crontab and read that as well. When done, you can execute sudo crontab -e to edit the superuser cron rules table of your computer. You probably want to add the line @reboot '/usr/bin/python /home/pi/myscript.pi' at the bottom. …
answered Dec 16 '16 by Bex
0
votes
If you need to run a script on your machine as a part of a web transaction to that machine, the easiest way to achieve that is probably to set up a web server, and use a technique called CGI, which ma …
answered May 16 '16 by Bex
0
votes
You should do both. If you want to learn every aspect of python programming, you should definitely read many books and websites. But start small. Learn how to blink a LED. http://www.thirdeyevis.com/pi-page-2.php …
answered Feb 10 '15 by Bex
3
votes
I would recommend pyglet rather than pygame if you don't need graphics. In my view it is simpler, more elegant, and better maintained. Then again, I expect it might be a matter of taste.
answered Jan 21 '14 by Bex
1
vote
Python is the official development environment on the raspberry pi, and pyramid is a python framework, so that should work just dandy. Though be aware that the raspberry pi is a small computer, also …
answered Nov 4 '14 by Bex
1
vote
This is almost impossible to answer as it depends on a lot of factors, but generally - yes, the pi and tornado will probably be able to have enough throughput for some of the resolutions. You can de …
answered Aug 7 '14 by Bex
1
vote
Ok, as it turns out, the file you tried to print was called serdata.txt and placed in the same folder as the python program, but the filename provided to printFile was /serdata.txt. The preceding …
answered Oct 30 '14 by Bex

15 30 50 per page