Questions tagged as 'python-3.x'

1
answer

How to get text, in CSS element receiving 2 class

I need to collect text from an angled system, where the element receives 2 CSS classes <div class="title ng-scope">80</div> I tested several ways to capture the text, but it does not return (the commented lines shows the attempt...
asked by 14.04.2017 / 23:13
1
answer

How to collect text when it has no reference HTML class - Python Crawler

I have the following situation: Iwanttocollect"Crawler Text" below, how do I navigate there without a class or id? <td>Texto para crawler</td>     
asked by 15.04.2017 / 00:09
1
answer

what problem, I can not pass the list to the other function?

def le_textos(): i = 1 textos = [] texto = input("Digite o texto " + str(i) +" (aperte enter para sair):") while texto: textos.append(texto) i += 1 texto = input("Digite o texto " + str(i) +" (aperte enter...
asked by 30.03.2017 / 19:08
1
answer

why does the loop while True access the if and the else in sequence to each complete loop in that code?

#! /usr/bin/python3 valor = int(input("Digite o valor a pagar: ")) cedulas = 0 atual = 50 apagar = valor while True: if atual <= apagar: apagar = apagar - atual cedulas += 1 else: print("%d cedula(s) de R$%d"...
asked by 28.03.2017 / 17:35
1
answer

Graph using python-igraph with attributes per node and edges

Speak up! I'm trying to create a graph using the Python-Igraph library. Each node would have an attribute, for example, in a graph of books whose nodes would be books and the attributes of those nodes would be: titulo: nome_do_titulo sinopse:...
asked by 03.05.2017 / 23:39
1
answer

How to print a message saying that the searched element was not found in the list? Python 3

Hello everyone! How do I print a message saying that the keyboard input is not in the list? Note: If the keyboard entry is in the list (for example if the user enters 'password'), the program should print the position of the element in the list....
asked by 13.03.2017 / 03:22
2
answers

help with indentation that is generating error in python 3.6

I'm doing a webcrawler I'm having the following problem. I had to do a separate program to print out how many candidates passed each course. Except that the last line is not being executed, and that it would make the vector names go to the next...
asked by 02.03.2017 / 23:24
1
answer

How do I pause a song in python?

I can make the program play the music, but the whole window is not functional and only works again when the music stops, ie creating a button with def to pause the button only becomes "clickable" when the whole song stop. from tkinter import *...
asked by 17.05.2018 / 11:43
1
answer

What's wrong with the function of sending messages to twitter?

import urllib.request import time def send_to_twitter(msg): password_manager = urllib.request.HTTPPasswordMgr() password_manager.add_password("Twitter API","http://twitter.com/statuses","usuário","senha") http_handler = urllib.reques...
asked by 29.12.2016 / 18:46
1
answer

This program in Tkinter does not display your widgets. Can someone explain why?

from tkinter import * class Autenticar(object): def __init__(self, toplevel): self.Lab1 = Label(main, text = "Usuário", fg = "Blue") self.Lab1.pack() self.Entr1 = Entry(main) self.Entr1.pack() self.Lab2 = Label(...
asked by 29.12.2016 / 00:28