Questions tagged as 'python'

1
answer

Python: list index out of range

I'm doing a short program to try Python, one in which you choose two lists of numbers and it tells you how many numbers in the second list are multiples of all the numbers in the first def esmultiplo (m,y,b): if y % m != 0 and b == True:...
asked by 03.07.2018 / 16:44
0
answers

Problem with variables and objects. Supestamente local variable behaves as global

I'm doing a code and this happens to me: First I made this class with the intention of using it as if it were a structure of those of C and C ++ class Data: titulo = [] id = [] fecha=[] Then I did a function where I gave values to...
asked by 18.06.2018 / 15:28
0
answers

Problems adding items to a list in python

I'm programming some things in Python, specifically a parser function that calls another function that returns the lines of a file, then, for each line a split is made to separate them into two fields, these fields are stored in a dictionary, th...
asked by 19.06.2018 / 16:29
1
answer

Search script on YouTube from Google API V3. I have the error (urllib.error.HTTPError: HTTP Error 404: Not Found)

I am trying to test this script in Google Python to do searches on YouTube. The code I have removed from here: link I had to make a couple of changes to make it work with Python 3 The only thing I've done is add parentheses to all pr...
asked by 16.06.2018 / 16:34
0
answers

Python How do I use robots.txt?

Does anyone know how to implement a robots.txt file in python with the Tornado framework ?, will it be so simple to place the file in the root of the project?     
asked by 19.06.2018 / 14:59
0
answers

Python 3 - Is assigning a value the same as initializing?

When we create a variable var1 = function1 () is it assumed that an assignment statement does not return a value by itself? or is it different if it is a function?     
asked by 19.06.2018 / 14:05
0
answers

empty text variable label- Python 3.6 - High Sierra OSX

I have problems using label.config(textvariable=texto) . As a result, it seems that text StringVar() has no content because 'TextoVariable' does not appear in the window. It seems to be an error of Tkinter in High Sierra...
asked by 19.06.2018 / 11:40
1
answer

Python HTTPConnectionPool Failed to establish a new connection: [Errno 11004] getaddrinfo failed

I was trying to follow a scraping tutorial on grupoothis , and I The following error arises after a couple of queries. The error in question Traceback (most recent call last): File "C:\Users\Sebastián\AppData\Local\Programs\Python...
asked by 17.06.2018 / 20:30
0
answers

Select Databases + Django

I'm doing a page that works with 2 postgresql database managers and sql server, postgres is on the application server and sql server can be on the same server or on another server my question is how can I connect with the server sql server being...
asked by 19.06.2018 / 13:57
1
answer

Shared lists in instances of classes (objects) [duplicated]

I have the following code class Num(object): i = list() def __init__(self): pass def imp(self): print(self.__i) def add(self, n): self.__i.append(n) from Num import * n1 = Num() n2 = Num() n1....
asked by 20.06.2018 / 06:07