Questions tagged as 'python-3.x'

1
answer

Read full data of a json

I'm trying to read the following json the problem that I can not find to read the whole structure. Json: [ { "fecha_fin": [ "10:00 21 de noviembre de 2018", "10:00 21 de noviembre de 2018", "10:00 21 de noviembre...
asked by 24.10.2018 / 18:14
1
answer

Relay, relay, relay does not turn on when running shell_exec or python exec in php7

Hi, I have this code on the Raspberry pi zero w: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title></title> <link rel="stylesheet" hre...
asked by 15.10.2018 / 06:16
1
answer

Carry a day count to rent a car, python

I'm doing an application in python, a simulator to rent a car, for now I'm doing it with 1 car in my stock. the number of cars and days is given by a ramdom and according to the range in which it falls, the amount is assigned. the normal flow...
asked by 09.10.2018 / 01:23
1
answer

Iterate over the current selector with XPath and Scrapy

I am scribbling information but I am stuck in the for loop. First, when I receive the answer, I create an xpath "root" to call it. This xpath root has one and every one of the items in a tag ul Then I pull out each of the data I need, but...
asked by 28.09.2018 / 21:51
1
answer

Find a key within a dictionary by means of a value

I would like to be able to find a key within a dictionary by means of a value entered. The example is as follows. diccionario = {'jorge' : 1, 'andrea' : 4} buscar = int(input("Introduce numero: ")) for nombre, numero in diccionario.items():...
asked by 07.10.2018 / 00:26
1
answer

Show all combinations by multiplying all the numbers in a matrix

Particles of a matrix of three columns and an indefinite number of rows.The numbers of the first and second row can be any number, and the third column is always a column of 1. Let's say that the number of rows is 5, and we have for example the...
asked by 23.09.2018 / 18:37
1
answer

AttributeError: 'Data' object has no attribute 'dragPosition' Python

I have the following problem, I have the following piece of code that I use to be able to move the MainWindow. def mousePressEvent(self,event): if event.button() == QtCore.Qt.LeftButton: self.dragPosition = event.globalPos() - self...
asked by 24.08.2018 / 04:20
1
answer

Isolate Qwidget from a function

How can I isolate the widget self.combo_login , the functions mousePressEvent and mouseMoveEvent ?, This is so that when the mouse is clicking on the self.combo_login these functions are not executed: code: fro...
asked by 24.08.2018 / 07:24
1
answer

NameError: name 'x' is not defined - Python - Django

I have a code that marks me an error of an undefined variable, but I do not know why. This is my Model: models.py class Model(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE, null=True) valor = models.Flo...
asked by 30.08.2018 / 06:27
1
answer

Error writing data in inertial sensor

I have managed to read the calibration values of the sensor and save them in a file. The problem I have is when I want to insert these values into the sensor, it throws some errors that I can not explain why I put the script and your help wil...
asked by 18.08.2018 / 01:23