Questions tagged as 'python'

1
answer

Use of instance attribute inherited from parent class

I have the following code: from PyQt5.QtWidgets import QMainWindow,QApplication from PyQt5 import uic class Primera(QMainWindow): def __init__(self): QMainWindow.__init__(self) uic.loadUi("Inicio.ui",self) self.pr...
asked by 01.08.2018 / 05:52
1
answer

How to split a .csv file by a field

It turns out that I have a file, in which to save the surveys and questions (columns) for example: opinion|date |¿Tienes coche?|Color coche|¿Tienes móvil?|Tipo_contrato|Seguro hogar Coches |28/08/18| Si |Rojo |...
asked by 29.08.2018 / 15:53
1
answer

Work JSON concrete values of an API

After making a request to an API I get an answer like the one shown below. { "mensaje": "success", "respuesta": [ { "tiempo": 594, "total": 1543419350 }, { "tiempo": 627, "total": 1543425114 }...
asked by 28.11.2018 / 11:01
1
answer

How to find the path of a file in windows with Python

My question is, how can I get the path of a specific program in windows for this case suppose word that the default executable is WINWORD.EXE . But even though the executable is the same in any version, it is not the same route in any machin...
asked by 22.08.2018 / 23:50
2
answers

Error: the object does not have an attribute [closed]

I have the following code: My problem is that the console output shows me an error that says:    AttributeError: type object 'Person' has no attribute 'say hello'   () Why does that happen and how can I solve it?     
asked by 23.08.2018 / 05:21
1
answer

Associate an event double click on a QTableWidget to a slot and get the row

I am trying to double-click on the row of a table to call the method and know which row it is. I tried to do: def Tabla(self): #Boton de exportar a excel toolButton = QtWidgets.QToolButton() icon1 = QtGui.QIcon() icon1.addPixma...
asked by 23.08.2018 / 11:16
1
answer

Make python print all exceptions in English

Currently my installation of python 2.7 prints some, but not all error messages in Spanish socket.error: [Errno 10054] Se ha forzado la interrupci¾n de una conexi¾n existente por el host remoto How can I make all exceptions be displayed in...
asked by 13.08.2018 / 06:30
1
answer

Extract data from a web page

I am investigating how to extract data from this web page (Updated price information). This generates a .xls file. My idea is to automate this extraction of files for example with some phyton library. I have seen other tools but I would like to...
asked by 03.08.2018 / 11:31
1
answer

What differences do the sendall & send functions have in python?

In Python, in the module socket there are two functions: send() and sendall() , both have the same parameters and the documentation of both is quite similar that I do not fully understand what differences there are between on...
asked by 25.07.2018 / 22:50
1
answer

convert U + XXXX to hexadecimal utf8

I would like to know how to convert a string like this: U + 1F601 to this format: \ xF0 \ x9F \ x98 \ x81 We can see an example on this page: link There you specify your UNICODE code and its value in bytes. I use python 2.7 Thi...
asked by 25.07.2018 / 12:19