Questions tagged as 'python-3.x'

1
answer

Single lists with at least 2 elements of difference

Considering the numbers: 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25 How do I generate lists of 15 items (numbers quoted above), and they must have at least 2 items of difference between them. For example: 0...
asked by 29.05.2018 / 03:02
2
answers

Static files in Django

Oops, I can not load static files. Thestaticfolderisinthecoreapplication,IalsotesteditwiththerootprojectandalsodidnotgetitImadeatestindexfile:{%loadstatic%}{%static"assets/css/bootstrap.css"%} <link href="{% static "assets/css/bootstrap....
asked by 11.10.2017 / 21:01
0
answers

AttributeError: 'NoneType' object has no 'startswith' attribute when trying to install with pip

I have a clean installation of Python on my machine and I could not install any packages using the pip. Python version D:\Users\julio.campos>python --version Python 3.6.3 Pip version D:\Users\julio.campos>pip --version pip 9.0.1...
asked by 17.10.2017 / 19:14
1
answer

Get range of values in pandas object.Dataframe

I have a pandas.Dataframe object with a date field of python. How do I get a recordset according to date range? An example of the data set (last 10 records): datpre codneg nomres modref preabe premax premin preult \ 153...
asked by 28.09.2017 / 14:49
1
answer

unicode error python when import fields with accented text

I have an error when I execute the command below, it generates the text file correctly when I import database texts without stress, but when there is some accent appears the error:    File "C: /Users/ti/Desktop/report.py", line 17, in doQuery...
asked by 06.07.2017 / 23:58
1
answer

Row Logic - Python

I have a question in a question, and I hope you guys can help me, the question itself is not how to develop the issue, this is not the problem, the problem lies in the logic of the issue that I am not getting understand, the question is this:...
asked by 26.03.2017 / 01:15
1
answer

Error: "selenium.common.exceptions.WebDriverException: Message: Unknown error: Element is not clickable at point"

I'm setting a series of " checkboxes " in a lista variable. Then I run the variable in a loop so that only a few of them are clicked. However when the checkbox is not visible on the screen, Selenium does not click and displays the e...
asked by 05.10.2017 / 00:54
1
answer

Python 3 Negative Indexes

So, folks. I am new to python and wanted to know the following: Do you have any way of knowing what the negative index of an item in a list is? For example, I have the following code: lista = ['a', 'b', 'c', 'd', 'e', 'f', 'g'] lista.ind...
asked by 12.09.2017 / 00:02
0
answers

Rename file in python3 [closed]

Please, can anyone help me? I want to rename files that have characters in the Ex name. "123Pedro.jpg" for "Pedro.jpg". I was trying to use str.translate (), but it is not working. Thanks!     
asked by 21.02.2017 / 23:06
1
answer

How to do this regular expression in python 3.6

I need to do a regular expression to extract the links from this string: links =('href=http://www.ufjf.br/cdara/sisu-2/sisu-2017-1a-edicao/lista-de-espera-sisu-3/?id_curso=01GV&id_grupo=70>ADMINISTRAÇÃO - GOVERNADOR VALADARES - DIURNO -...
asked by 26.02.2017 / 15:32