Questions tagged as 'python'

1
answer

check if a certain field is the same as desired

I would like to check if a particular field in a list is equal to == "Open" def mostrar(): with open("ficheiro2.txt") as arquivo: i=0 for linha in arquivo: linha = eva...
asked by 02.01.2019 / 14:57
1
answer

I do not know how to move from one option to another [closed]

I tried to do in the first few lines a menu that would direct to an action if a certain number was entered, but an error appears which I do not know how to solve def menupricip(): print ('#### Lucy_Main ####\n###################\n1°-Lista de...
asked by 26.12.2018 / 15:58
1
answer

Beautiful Soup - Remove a tag while keeping Text

I have the following tags: <p>Projeto N <sup>o</sup> 00.000, DE 00 DE JANEIRO DE 0000.</p> I would like to remove the tag by keeping the text. I needed it to look like this: <p>Projeto N o 00.000, DE 00 DE...
asked by 28.11.2018 / 16:24
1
answer

Problem with graph in Python

Through calculations and mathematical expressions, starting from the information of three data reported by the user (Distance from launch - ), Calculate the velocities that are involved (Velocity in X - Velocity in Y). So far so good! The...
asked by 20.11.2018 / 12:22
1
answer

I want to "capture" the path and use it in another program

I have a "ransomware", in which I put a path to a folder and it encrypts / destroys I have a job to present in college where I have to create a graphical interface, I created a simple screen, with 2 buttons and a text cx, the text cx would be...
asked by 04.11.2018 / 23:31
3
answers

How to receive a vector whose values are separated by spaces

I'm starting in python and I use a site that has several problems for resolution, in it the vectors and arrays are passed with values separated by a space and not comma. For example: v = 1 2 3 43. I know I can get this value in the input and...
asked by 28.07.2014 / 15:37
1
answer

FLASK - Change goable in template

I passed the template a variable and need to change (in the template) the value of it. Ex: no controller: return render_template('index.html', start_code = start_code) . I need to change start_code there in the template. How do I?...
asked by 01.11.2018 / 13:30
1
answer

How to know the direction of the mouse?

I would like to make a small program that indicates to which position the mouse is moving (right, left, high, low, right and high, right and low ...), but I can not come to a logic that give this result. Examples: If the Y and X are being inc...
asked by 27.10.2018 / 10:34
1
answer

module 'cv2.cv2' has no attribute 'COLOR_BRG2GRAY'

I am resizing images from a folder and am encountering the following error: module 'cv2.cv2' has no attribute 'COLOR_BRG2GRAY' Code: pathC = './cityscape/' dirs = os.listdir(pathC) #Resize para o pathC np.array def resize(): path = pathC...
asked by 19.12.2018 / 12:13
2
answers

Python language error

I'm new to Python, giving this error in the image. link What can I do to resolve?     
asked by 27.08.2014 / 16:09