Questions tagged [python]

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.

Filter by
Sorted by
Tagged with
3
votes
0answers
1k views

Blitting to the screen, NodeJS and OpenVG [closed]

I have managed to get 4 rtsp video streams from IP cameras to render on my screen via multiple instances of omxplayer. However, I would like to add some text and graphics to this screen with ...
1
vote
1answer
2k views

raspberry pi django and RPi

Did anyone installed RPi and use it in the django Python framework? I've tried to wire up a motion sensor with the django but I'm stuck while trying to use RPi.GPIO inside django view and I get:
6
votes
2answers
13k views

Sending Commands from PC to Raspberry Pi via USB

I am currently doing a project with the Raspberry Pi as a controller connected to a PC via USB and using the Pi to send commands to other devices connected via GPIO pins. Simplified version: ...
2
votes
4answers
2k views

Raspberry pi and shift register

I have a project using a Raspberry pi and an 8 bit shift register to pull one of the 8 pins to ground if an event occurs, but leave it at 5 v 99% of the time. Ideally this will be done with Python, ...
1
vote
1answer
1k views

Why is my read data MCP23017 not working

I'm trying to add a button to my MCP23017 board. But my code is not working. What am i doing wrong? import smbus import sys import getopt import time bus = smbus.SMBus(1) bus.write_byte_data(0x20,...
2
votes
1answer
6k views

Detect available open WiFi networks using Python

Is there some way I can detect available WiFi networks, which are open, using Python? I know I can do it on my Ubuntu box, but I haven't received my Pi yet, so I haven't been able to run the same code ...
0
votes
2answers
8k views

Accessing a USB drive after start up with Python

I'm working on a picture viewer using python, that executes on startup of X (using LXDE/autostart) and accesses an attached USB drive and starts to display the images it finds. I'm using the current ...
2
votes
0answers
3k views

How to use socat to transfer serial commands in a script over TCP/IP? [closed]

I have a web application that will constantly post some queries and get replies from a device through the serial port on Raspberry Pi. Like this: @cherrypy.expose def login (self, **data): ...
6
votes
2answers
2k views

Problem with Python Games

Having eagerly ripped open my newly arrived toy, I've just installed the Raspbian Wheezy image & am impressed that it really does just boot and appears to work - however, the Python Games that ...
1
vote
1answer
2k views

Connecting the HMC6352 compass module to a Raspi using I2C

I am trying to connect a HMC6352 compass module to my Raspberry Pi. According to the datasheet I need to send an "A" for a read command. However, I am somewhat new to I2C and do not know how to ...
0
votes
1answer
1k views

Python errors reading / writing files from Python executable

I'm writing a Python application that is executable. It reads and writes to a file. The application uses wx for a GUI and has been given the following permissions: chmod +x app.py When I load the ...
0
votes
1answer
1k views

Difference between ipython and python on SimpleCV installation?

What is the difference between, sudo apt-get install python-opencv python-scipy python-numpy python-pip (from the book Getting Started with Raspberry Pi) and sudo apt-get install ipython python-...
4
votes
1answer
12k views

SimpleCV installation on Raspberry Pi

I want to install SimpleCV, a Python framework for computer vision, on my Raspberry Pi. These are the steps I followed: Step 1 - install dependencies sudo apt-get install python-opencv python-scipy ...
1
vote
2answers
117 views

Is there any way to hide my email when deciding to become a dev on the raspberry pi store?

I think that I will have much more excitement creating python programs if I am a dev on the Pi store. I also do not want to share my email. Is there any way for me to hide my email as a dev, or ...
4
votes
1answer
4k views

Zbar Installation

I'm attempting to install zbar on my raspberry pi. I built the source by entering: ./configure make make install I don't get any errors or warnings from any of the above commands. After the install ...
0
votes
1answer
147 views

Is there a system that i can run that can seamlessly pull audio and video files from a flash drive?

I noticed that a lot of people are asking about video performance capabilities and things along those lines, but they all seem to be either streaming their videos through Ethernet via Youtube, etc or ...
3
votes
1answer
4k views

Reading serial data from Arduino

I have am working on a project where I'm trying to get a Raspberry Pi to play some sounds when triggered by button presses on an Arduino. The command is sent to Raspberry Pi through serial. I used ...
4
votes
4answers
4k views

Infrared NodeJS

I just orded my RPI a while ago (Haven't recieved it yet), and this is just completely out of curiosity, but will I be able to connect some sort of IR receiver, and get it's input in Node? Or is this ...
3
votes
2answers
4k views

python audio bindings

I'm trying to get python audio input on my raspberry pi. So far I've installed the following: My inquiry looks similar to this one, but I'm not using an audio card, I just have a webcam plugged ...
2
votes
0answers
345 views

Pi - Detecting hdmi out or power interrupted [duplicate]

Does anyone know of a way to script this? The idea being that using raspbmc / hdmi to TV / Tv USB to Pi mini USB (with a battery for buffer)... You could have your Pi running off the tv's usb. When ...
5
votes
2answers
1k views

Using Quickly to develop apps for Raspberry Pi?

Can Raspberry Pi apps be developed with Quickly on Ubuntu? I know there isn't Ubuntu for the Pi yet but what I want to do is develop the app on my Ubuntu machine, compile it and copy the deb file to ...
4
votes
1answer
2k views

Comparison of Python Gui performances

I am building a data visualization application. It is a multithreaded Gui without user interaction. I have 24 widgets that shall be updated any 100ms. 16 widgets are PyCairo rectangles and the other 8 ...
1
vote
1answer
2k views

Espeak over python cgi

I am running lighttpd webserver on my raspberry pi (raspbian os). On my small website I have a form which executes a python script via cgi - this part is working okay. Now I tried to call espeak from ...
2
votes
1answer
638 views

Updating wheezy breaks Adafruit_CharLCD

So, just to try and keep the wheezy up to date I did an apt-get dist-upgrade and upgraded a couple of things, among which python. Now, when I try runing the example ./Adafruit_CharLCD.py I get no ...
7
votes
1answer
18k views

How do capture audio using Python?

More particularly: How can I use python with ALSA to capture audio input? I'm thinking about doing an oled-based spectrum analyzer for Pi-based audioplayer. One part of the solution is to read the ...
1
vote
1answer
986 views

Python SQLite3 select with and operator

I'm pretty new to python and SQLite but have done substantial work with MySQL and php. I'm trying trying to do a conditional select on some data and would like to use the AND operator. The MySQL ...
5
votes
2answers
2k views

Is running a CGI server as root too dangerous?

I've setup my Raspberry Pi with nginx and fcgiwrap as CGI. I wanted to control GPIO ports using a Python script with the Rpi.GPIO library. The problem is that in order to be able to control the ports, ...
1
vote
1answer
583 views

sample speed i2c

If running standard release of debian on my Rpi. How fast can I sample the sensor readings through i2c and save values? Why Im asking, I tried to read a DS18B20 and save it,s values (wrote the ...
5
votes
1answer
3k views

BlasNotFoundError when installing Scipy through pip

I'm trying to install Scipy in a virtual env through pip and I'm getting an error that says numpy.distutils.system_info.BlasNotFoundError I've never run into this before and I installed numpy from pip,...
3
votes
0answers
291 views

Detecting dot11 association packet, etc. [closed]

I actually encountered some problem of detection on Scapy and Python. Okay, I started with creating mon0 by airmon-ng after which my I ran my script: if p.haslayer(Dot11AssoReq): print p....
10
votes
1answer
1k views

Is it possible to communicate with i2c devices via the GPIO? [duplicate]

Is it possible to communicate with i2c devices via the GPIO? Also, are there any existing drivers or libraries that make this possible from Python?