Questions tagged as 'python-3.x'

1
answer

Detect the moment entered in an Entry

I'm doing a program that consists of a single Entry (). The thing is that I want you to immediately detect what is written and act one way or another. So when you finish putting the last character of for example "add", do one thing. I've t...
asked by 06.08.2018 / 18:17
1
answer

Maintain the session when downloading the capcha

I have this code that I downloaded the captcha but I have to send the data along with the resolution of the captcha. My question is: How do I keep the captcha download session and send the form request along with the resolution of the captcha (I...
asked by 10.08.2018 / 18:48
1
answer

grayscale enhancement - artificial vision

a. Write a function that allows you to highlight a specific range of grays in an image. The function must receive as input parameters: a grayscale image (uint8), parameter A and B that defines the range of values that the function will highlight...
asked by 27.08.2018 / 18:18
1
answer

Convert text into a tuple or list (Python)

Hi, I would like to convert a text into a tuple or list. The text got it out of here: import os passwd=os.system("cat /etc/passwd | tail -1") Now that I have the variable passwd with the text I want, how do I convert it into a tuple or list...
asked by 15.08.2018 / 19:05
1
answer

QGridLayout to arrange the elements at the top of the screen

I am using QGridLayout in Pyqt5 to build a window in python. What I want to do is that the elements are not available to occupy the entire width and height of the window, but they are grouped in the upper area of the window. My code is: def __...
asked by 13.08.2018 / 13:30
1
answer

Start animation with hover event in python

I'm doing an animation of a simple frame, but I want the animation to start when the cursor is on the frame and return to its initial shape when it leaves the frame. Since at the moment it only works with one button, this is my code import...
asked by 26.06.2018 / 18:48
1
answer

Jinja2 check if a value exists in a list of dictionaries

I'm trying to check if a value exists within a dictionary list. Use flask 1.0.2. See the example below: person_list_dict = [ { "name": "John Doe", "email": "[email protected]", "rol": "admin" }, {...
asked by 07.09.2018 / 18:18
1
answer

problem in condition while "assignment operators"

Hello, I have a problem that I do not understand when using assignment operators the exercise is about printing a sum from 50 + 48 + 46 + 44 ... 20 n=50 h=0 #que hace esta variable? while n<=20: h+=n #no entiendo lo que hace esto n...
asked by 22.05.2018 / 17:58
1
answer

libvlc - python access violation reading 0x00000094

Good afternoon I am trying to generate a Python player with PyQt using the Python binding for VLC (libvlc), but it throws me the following error: This is my code: import sys from PyQt5.QtWidgets import QMainWindow, QApplication import...
asked by 18.05.2018 / 00:45
2
answers

Delete and replace values in python pandas using conditionals

I have the following Dataframe prueba = M1 M2 M3 M4 0 1 1 1 NaN 1 2 3 3 NaN 2 3 2 2 1 3 4 NaN 1 NaN 4 1 NaN NaN NaN 5 1 3 2 2 6 3 3 NaN...
asked by 20.05.2018 / 23:13