Questions tagged as 'python'

1
answer

How can I do this without needing this global variable?

The problem I have is the following I have a method that should and called 4 times, once every 750 ms. The problem is that the way it is called I can not pass arguments to it, because it is called through pygame.time.set_timer. So I created a gl...
asked by 09.06.2018 / 17:30
0
answers

Interaction with pandas

import pandas as pd import numpy as np df = pd.read_excel('resultados.xlsx') df Con b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 1 30 22 2 1 17 8 4 19 20 11 14 6 21 7 23 3 2 29 13 14 6...
asked by 21.06.2018 / 04:36
2
answers

How to access content from a json file?

I have a JSON file of information extracted from Twitter through the tweepy library, a piece of the contents of the file is as follows: Status(extended_entities={'media': [{'source_user_id': 3383675067, 'url': 'https://t.co/x03h8R996T',...
asked by 06.06.2018 / 05:17
1
answer

ConnectionRefusedError: [Errno 111] XML-RPC python

I am trying to connect to a server using python 3 with xml-rpc, but an error is appearing every time I try to connect: ConnectionRefusedError: [Errno 111] Connection refused This is my server code: (NOTE: I'm just doing silly tests.) from x...
asked by 10.06.2018 / 05:11
1
answer

How to check existing data in bd?

I need to check if a data already exists in the DB before registering it in python, where bd has the table VideoCapture and its attributes are id, name, value .... need to verify the name before registering in bd in python ...     
asked by 10.06.2018 / 18:34
0
answers

How to access the warnings window for information not found? (Selenium)

In python 3 and selenium webdriver I have this program to insert codes into a website and store the information returned: from selenium import webdriver profile = webdriver.FirefoxProfile() browser = webdriver.Firefox(profile) # Site que é a...
asked by 12.06.2018 / 14:05
0
answers

How to make this code work better (list of combinations)?

import random def ordenar(inputx): inputx = list(inputx) inputx = sorted(inputx, key=int) return inputx def get_numbers(totall): return random.sample(numeros, totall) numeros = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,...
asked by 02.06.2018 / 02:41
3
answers

How to create a "* .exe" executable in python?

I need to turn ".py" files into ".exe" executables to run on any Windows desktop. Currently use 3.3     
asked by 24.04.2014 / 04:27
2
answers

How to find and display the position of an item in the list, not setting the string value for the search? [duplicate]

How to find and display the position of an item in the list, not setting the string value for the search? Ex: nome_pessoa = str(input('Informe o seu nome completo: ')) lista_nomes = nome_pessoa.split() After the names are divided an...
asked by 01.06.2018 / 00:59
0
answers

I can not create an image in the right window, it will stop in the first window

I'm doing a program with a 'HELP' button. When I click the 'help' button I would like a picture to appear inside the window it opens, however the photo will stop in the first window and not in the window it opens. I can only make the photo ap...
asked by 01.06.2018 / 20:37