Questions tagged as 'python'

1
answer

python command to "get" the text from the Qt Designer fields and save it in sqlite

Good afternoon. I'm enthusiastic and I'm starting in python. With Tkinter I can send the field text to the database with the "get ()" function, in gtk, if I'm not mistaken, with "get_text ()". I would like to know what this function would be in P...
asked by 08.03.2018 / 18:26
1
answer

DJANGO Rendering one FOR within another

I have a situation that is as follows: I need to do in one html TableA where I have to show the totals and line and the values that make up this totalizer, as a small example below Recipes = 100,000.00     Salaries = 60,000.00     Extras...
asked by 14.03.2018 / 02:56
1
answer

If / Else condition in a column (python)

I need to construct an if / else in a column in table [6]. Here is the output print (without if / else applied): Followthecode:importrequestsimportpandasaspdfrombs4importBeautifulSoupurl_dados=' link ' r = requests.get(url_dados) payload...
asked by 07.03.2018 / 14:19
1
answer

Check the relationship of two objects in a list

I need to extract from pure text the total value of an agreement. I have hundreds of documents with some values, and I realized that usually the highest value is also the total value of the agreement, but in some cases, not. def ata_values(tex...
asked by 06.03.2018 / 12:56
0
answers

ubuntu - error trying to update packages

I'm trying to update the packages and is giving the following error when trying to update sudo apt-get upgrade Lendo listas de pacotes... Pronto Construindo árvore de dependências Lendo informação de estado... Pronto Você pode querer e...
asked by 13.03.2018 / 17:27
1
answer

Python: how to edit tag with bs4

I have a html code, well polluted with Style in almost all tags, as well as% unnecessary% tags. How can I use beautifulsoup, to remove only attrs = style in <font><span> and the <p> tags without removing their...
asked by 12.03.2018 / 04:26
0
answers

Changing specific positions of a vector, determining random and equal values

I have the following vector: [**17, 17**, 1954, 909, **17, 17**, 411, 844, **17, 17**, 1954, 909, **17, 17**, 411, 844] As can be seen, the indices [0,1]; [4,5]; [8, 9] and [12, 13] are equal. I need to assign a random value, but equa...
asked by 10.03.2018 / 03:32
0
answers

(Python2.7) OpenCV send frames through socket

I'm trying to send OpenCV frames through sockets, with the code below. The problem is that the video ends up splitting into several rows or columns. I can only run with python2 (2.7) obs: This code is not mine. source: link Client:...
asked by 10.03.2018 / 02:18
0
answers

Python - Tkinter Scrollbar

I would like to put the buttons in an organized way from top to bottom, in order, but they are either above the Canvas, or in the middle, or below, not having a sequence. Next I created Canvas and two scrollbar on the right and bottom. Here i...
asked by 01.03.2018 / 22:04
1
answer

Image displayed on one machine, and another not in Django

I have an app in django that runs in two places, one at work, which is where there is effective production, and in my house, which is where I make adjustments because here I have time. The project is hosted on bitbucket and I always use the same...
asked by 01.03.2018 / 05:48