Questions tagged as 'python'

0
answers

How do I update a button when an external event occurs?

I made a small application where it communicates with an external drive by querying some Boolean variables. Depending on the status of these variables, a button is placed on the screen and a figure is included in this indicating the status of th...
asked by 06.02.2018 / 13:15
0
answers

Comparing two data frames in python

Good evening, gentlemen. I'm new to python, and programming. I'm trying to compare two different data frames, each one with the data of cars of a specific year. For now I've done the following: year_08 = np.repeat('2008', 1061) # Variável c...
asked by 02.02.2018 / 21:02
1
answer

Error with OpenGl in Python

(k36) C:\Users\rudij\Desktop\etapa 1>python main.py [INFO ] [Logger ] Record log in C:\Users\rudij\.kivy\logs\kivy_18-02-02_3.txt [INFO ] [Kivy ] v1.10.0 [INFO ] [Python ] v3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 1...
asked by 02.02.2018 / 22:52
1
answer

How to create tuple with key receiving value?

I would like to create a method that returns the Django ORM FILTER parameters. I will have to use these filters at different times, I would like to create this generic method. Here's the example: def home(selected_page=None): _config = Con...
asked by 05.02.2018 / 18:22
1
answer

How to make a window stand above all?

I do not know if it's possible to do this, so I will not even put a Code here. My question is, if it is possible to make a window stay in front of all other windows, and I'm not talking about (TopLevel), I wanted the program window to be in fron...
asked by 05.02.2018 / 18:48
1
answer

Sort grammatically a word in Portuguese

It is known that it is possible to morphologically classify words through the nltk module, but it works directly with English only, requiring a complicated process for other languages. Is there a module or method that makes it possible to classi...
asked by 05.02.2018 / 18:08
0
answers

Python - CTR class does not register in DB

Good evening. Application developed in Python 3.x Database: sqlalchemy. I'm trying to develop a simple product registration system in a SQL database. For that, I am trying to develop from the MVC Standard (Model, View and Controller). In...
asked by 01.02.2018 / 23:27
1
answer

TypeError: not all arguments converted during string formatting (python)

I'm new to programming, I'm trying to make a program that checks if an inserted number is prime, so I'm checking to see if the rest of the number division by prime numbers is zero. def primo(): numero = input("Digite seu numero: ") if nu...
asked by 02.02.2018 / 17:05
0
answers

Problem with Scrapy SplashFormRequest

I'm having a problem with Spash forms requests, using only Scrapy the page loading is done normally, but when I use docker + splash the page does not make the next request. Scrapy: # -*- coding: utf-8 -*- import scrapy class QitestSpider...
asked by 04.02.2018 / 20:23
0
answers

sorl-thumbnail forcing height

I have a problem with the sorl-thumbnail . When I try to force HEIGHT AND WIDTH it does not respect, it creates a value proportional to the image. get_thumbnail(avatar.url, '200x200x', quality=100) It is generating 200x133 . How c...
asked by 05.02.2018 / 22:05