Questions tagged as 'python'

1
answer

How to select a field and type in it with selenium?

I'm trying to select the input field but I'm not getting it. Error Traceback (most recent call last): File "C:\Users\Pichau\Desktop\Teste.py", line 7, in <module> elem.clear() File "C:\Python27\lib\site-packages\selenium\webdr...
asked by 03.05.2018 / 22:26
1
answer

How to encrypt password with Python

I need to encrypt password using Python, from what I saw in PHP examples, they use a "module" that encrypts the password and that in theory does not to decrypt, to validate the password they encrypt the password that the user typed and compares...
asked by 04.05.2018 / 20:20
1
answer

Return the lowest value - Python

from collections import OrderedDict #Pra poder acessar os elementos igual listas e tuplas. v v v lista_aberta = {(1,3): [1,2,3,4], (1,4): [2,3,4,9], (1,5): [3,4,1,7]} I need to chec...
asked by 11.04.2018 / 18:29
1
answer

Vertical table template Flask

I'm a beginner in flask and in front end I have a table that returns me information from an API, but instead of it playing information in the table vertically it's going to horizontal, how do I fix it? / p> <!doctype html> <html> &l...
asked by 10.04.2018 / 20:51
1
answer

Filter a specific element within a stripe within another list [duplicate]

I have a filter to find the index of a stripe inside another list (I found in the group author Anderson Carlos) fila = [['vitor','5'], ['vitor', '4']] def sdb(filadb,nome,elemento): if not (filadb): return None else: filadb_l = fil...
asked by 06.04.2018 / 04:17
1
answer

Error in requests with aiohttp in asyncio

import time import urllib.request import asyncio import aiohttp URL = 'https://api.github.com/events' MAX_CLIENTS = 10 def fetch_sync(pid): print('Fetch sync process {} started'.format(pid)) start = time.time() response = urllib.re...
asked by 12.04.2018 / 07:19
1
answer

Python indentation error

I already program in c, I'm mdc in Python but I'm having difficulty with indentation, because in c we do not care about it, could someone help me, my code below numero = int(input()) for i in range(): x = int(input()) n = int(input())...
asked by 09.04.2018 / 19:10
1
answer

Create file without knowing directory? Python

It is known that it is possible to create a new file through Python through file_create = open(r'C:\Diretório\Diretório...\FileName', 'w') . However, it is necessary to indicate where this file will be created on the computer. If we wan...
asked by 09.04.2018 / 19:41
1
answer

Flask: Stream radio

This is the first one that I will try to embark on in this style project and I have some doubts that I would like to clarify, this may sound very lay. I will use Flask for development and radio is established on the SHOUTcast platform, I con...
asked by 21.04.2018 / 21:02
2
answers

Python, percentage of values (result)

This is what I need to do for the program to show the percentage of votes, but if I start the variable with zero it does not, because the program says that division by zero does not, but if I start with 1, It's going to go wrong, can someone giv...
asked by 22.04.2018 / 03:31