Questions tagged as 'python'

1
answer

Why is the 'data' variable not defined?

Code: arquivo = open("surfing_data.csv") id_de_verificação = int(input("Insira a ID do surfista desejado: ")) def pesquisa_de_surfista(pesquisa): dados = {} for linha in arquivo: (ID, nome, pais, média, prancha, idade) = linha...
asked by 23.01.2017 / 23:14
2
answers

How to correlate files from two txt files in Python

I would like to know a way to correlate equal words to different txt files. It will read the words from a txt file and look up those words in the other txt file.     
asked by 07.10.2017 / 17:02
1
answer

Graph using local time instead of GMT time

import matplotlib.pyplot as plt import matplotlib.dates as dates from datetime import datetime, timedelta x = [] y = [] dataset = open("datasetDdos10Abril2017_unixtime.csv","r") ##separacao no csv eh por virgulas for line in dataset: line...
asked by 28.05.2017 / 06:37
1
answer

What happened to Unicode in Python 3?

I'm starting to use Python3 slowly. I was running a certain code that I used to run with Python2.7 and got the following error:    NameError: name 'unicode' is not defined So, I understand that unicode does not exist in Pyth...
asked by 23.11.2016 / 13:29
1
answer

Grab a button in Splinter (python)

For most buttons that I try to grab using Splinter, the commands that are on this site ( link ) suffice. However, for this particular button, I do not find a way to grab it. <button type="submit">Vote</button> How do I do if...
asked by 13.11.2016 / 20:56
3
answers

ValueObjects Django

Good morning, I'm starting now with Python and Django and I had a question about the creation of my models. I'd like to create something like: Person (models.Model) Name ... Address Address () Backyard Neighborhood ... T...
asked by 11.08.2016 / 18:18
1
answer

Is there any way to read an XLS file and manipulate it in Python?

Is there any way to read an XLS file and manipulate it in Python? Does any library allow this?     
asked by 08.08.2016 / 02:31
1
answer

Changing key in the Windows registry 10

The code below is giving "Registry Error", that is, it does not create the key in the Windows registry. Does anyone have an idea how to solve it? import socket import time import subprocess #Executar comandos do SO import tempfile #pegar o tm...
asked by 03.08.2016 / 18:37
1
answer

WebDriver Error in Python3.5 AttributeError: can not set attribute

I need to download content from a website. I made a code in python 3.5. When I run it just for a single page the code works fine but when I put it in a loop or function it gives error. The code as function is as follows: from bs4 import Bea...
asked by 20.09.2016 / 19:16
1
answer

Blueprints - what is the concept? What is it for?

As I voted for Flask (python), I now see so many examples using blueprints. What are? What are they for?     
asked by 14.06.2016 / 21:12