Questions tagged as 'python'

2
answers

How to use Python properly for automation test using aws device farm

I have a mobile application and I want to use aws device farm to perform automation test . I am working on Mac, I have tried a simple test of my Android application: touch a button of sign in , type username and password and login. I us...
asked by 23.03.2016 / 15:46
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 / 16:17
1
answer

Get the positions of the array where you find a value with numpy.where

I have an array of the form: array = ['A', 'D', 'A', 'A', 'A', 'D', 'A', 'A', 'D', 'A'] And I need to get the positions of the array where I find 'D' . What I'm trying to do is: d_pos[numpy.where(array == 'D')] But I get the foll...
asked by 21.09.2016 / 18:34
2
answers

Pyramid of numbers in python

I must make a pyramid that something like this  n = 5 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 but what I try to do gives me that way number n: 6 0 1 2 3 4 5 0 1 2 3 4 5 1 2 3 4 5 2 3 4 5 3 4 5 4 5 5 6 this is the code nu...
asked by 16.10.2018 / 03:15
1
answer

Validate field and do not close the form

I am working on a plugin for Qgis, in the form the user enters the data and one of them is the name of the file, so I validate the field and verify that the same name does not exist, the problem is that if there is a sample a message and the for...
asked by 07.08.2018 / 12:10
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 / 16:48
1
answer

How do I order a text file in descending order?

So far I have tried with these examples and I have not been able to solve it: linea1=(open("ENDEUDADOS2.TXT")) linea1.sort(reverse=False) I get an error:    AttributeError: '_io.TextIOWrapper' object has no attribute 'sort' with this...
asked by 26.07.2018 / 13:42
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 / 16: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 / 17: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 / 11:30