To be used when a piece of code in a question is specifically related to any version of Python 2.
Questions tagged [python-2.x]
77 questions
1
vote
4 answers
Python script not running on boot from /etc/rc.local
I'm trying to ran python 2.7 script on boot, and did following:
sudo nano /etc/rc.local
Modified file before exit 0 with line:
sudo /usr/bin/python /home/smart-scale/scoreboard/main.py &
That command works on ssh terminal
Added "#!/usr/bin/python"…
dev-1000
- 21
- 1
- 4
1
vote
2 answers
Self balancing a quadcopter using python and a gyroscope information?
I have these information: x, y from gyroscope.
1, 2, 3, 4: motors
If the quadcopter is slant to front y is a positive number.
If the quadcopter is slant to back y is a negative number.
If the quadcopter is slant to right x is a positive…
Pablo Iuly
- 13
- 4
0
votes
1 answer
Problem installing pynput module for python 2
I am having issues installing one python 2 module (pynput).
In fact I typed the command:
sudo pip install pynput
It works when I try the following snippet:
import pynput
but when I type:
from pynput.keyboard import Key, Controller
The console…
Julien Blomme
- 15
- 1
- 6
0
votes
1 answer
cannot open shared object file: No such file or directory
Here I am trying to import 'libEpsonFiscalDriver.so' file on a Raspberry Pi using Python 2.7.
Here are my steps in python:
import ctypes
ctypes.cdll.LoadLibrary('/home/pi/odoo/my_module/escpos/lib/libEpsonFiscalDriver.so')
When I run this, I get…
Parth Patel
- 1
- 1
- 1
0
votes
1 answer
Remotely debug python code on pi using Eclipse in windows
I am new the raspberry pi and I have just started my python development on it. I have installed eclipse in windows along with pydev. I have even made a ssh connection from eclipse to pi so now I have access to all the files of pi.
I want to know is…
S Andrew
- 480
- 1
- 6
- 20
-1
votes
1 answer
How to add Rpi.Gpio to pycharm
I'm developing an application which interacts with raspberry pi.I need to get the temperature and humidity sensor readings from raspberry pi, for that I wrote this code.(I'm using python 2.7)
import RPi.GPIO as GPIO
import dht11
import time
import…
swtCode
- 1
- 1
- 1
- 1