Questions tagged as 'python-2.7'

1
answer

Error installing pylint on Mac OS

Good morning I'm working on Mac, python 2.7.10 and with VSCode and I get a notification saying the following: Linter pylint is not installed. I click on install and start downloading but at the end it marks the following errors and for obvi...
asked by 17.06.2017 / 19:14
1
answer

Error using a constructor in python 2.7

I was doing an object-oriented python 2.7 work, I'm quite new to python, and when I run the code it notifies me of the following error: I am instantiated the object and then serialize it with the "Pickle" module and save it in a file as...
asked by 18.03.2017 / 22:18
3
answers

How can I implement a graphical interface in the programming language python 2.7?

I'm new to the python language, the project I have to do is the pascal triangle, which I have already done but I still need to implement the graphical interface to the modules that I have in the project.     
asked by 17.11.2016 / 01:23
1
answer

Round decimal up in Python

I have a decimal number of 1.1 or 1.2 or 1.6 or 1.9 what I want is to approximate any of these numbers to 2. I mean I have a 1.1. How do I approach 2? By means of int() all approaches to 1, the same if I have 3.4 or a 3.1 or 3.8 approa...
asked by 26.04.2016 / 16:14
1
answer

I missed the following error expected an idented block

I'm something new in this programming, I've seen several codes, but I do not get the point I want to get, I want to put on my hobbies, a music player and a background photo. But this jumps me the error of the title. class App: def __init__(se...
asked by 04.11.2018 / 04:53
2
answers

Delete item from a list in python

I do not know what I'm wrong about, I have the concept but it confuses me a bit def eliminarEnLista(L): n=int(raw_input("Ingrese el numero que desea eliminar de la lista: ")) L=[] i=0 while i <len(L): for c...
asked by 21.10.2018 / 00:15
1
answer

Error in parameterized query: TypeError: list indices must be integers, not str

I am developing a GUI that manages my database in Python 2.7 that connects to a MySQL database. You can already insert, consult and delete but what you can not do yet is update with the UPDATE statement. I get the following error: Exception in...
asked by 11.10.2018 / 21:59
1
answer

crop and center to square formed by points with OpenCV python

I was wanting to make a cut of a square formed by points and then center that cut on an image with opencv in python, I have a problem generating a square around the place where I have the most points. This is the original picture: And this...
asked by 19.09.2018 / 20:23
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 / 10:19
1
answer

How to format a string in a fixed position?

My program tries to search links on web pages And when the page is valid the application writes [+] Found [+] and if the link is not valid write [+] Error [+] but each link does not have the same length . Here is an example of how the applicatio...
asked by 26.07.2016 / 04:33