Questions tagged as 'python'

1
answer

How to access the menu item of a menu

I would like to know how to access an item from a menu, to connect it to a function or handler . For example, I would like to control the behavior of the application when I click in the item menu. The function bind can be useful, bu...
asked by 19.10.2014 / 20:08
4
answers

How do I capture each key typed in python

I'm trying to make a program that captures the keys typed on the pc, so that I can access them later. I do not know where to start. I do not know if it uses sqlite3 (database), in google I researched, but some explanations are zero.     
asked by 05.09.2018 / 06:03
2
answers

Python variable reference return

When we define a variable, we are basically naming a memory address, it follows a script that represents my doubt: class Spam: _value = [] @classmethod def value(cls): return cls._value >>> Spam.value() [] So...
asked by 12.08.2018 / 05:02
0
answers

Django admin use the request attributes

I'm developing an application in Django and have used the request data in form to validate some fields. For example, if the user who is changing form is from the "Administrator" group, changing the user's password does not have...
asked by 12.08.2018 / 17:22
1
answer

string treatment in pandas

Good Night Sirs, I have the following Dataframe, imported from an xlsx. NUM_LEGISLACAO DSC_URL COD_SITUACAO ... DSC_TIPO num ano 264 89.272/1984 NaN 2.0 ... NORMATIVO 89.272 1984 265 90.396/1984 N...
asked by 15.06.2018 / 17:58
0
answers

Error trying to disconnect using social-auth-app-django

Good afternoon guys, I am building an application in Django, where it is necessary for the user to authenticate through his Microsoft account, for this, I am using the social-auth-app-django / strong>. Authentication is occurring normall...
asked by 29.05.2018 / 23:55
0
answers

Implement a blink counter on haar cascade face detection

How do I display the amount of blinks of people currently detected. The code below detects against haar cascade, where it displays a face counter. from __future__ import print_function #importa a funcao da biblioteca future import cv2 cap =...
asked by 04.06.2018 / 19:35
0
answers

How to do python only read the file when it is complete

I'm doing a program that reads a .txt file that updates itself in the execution of another program in fortran and creates a real-time animation of the temperature map of a board, however it is giving an error because the fortran is updating the...
asked by 31.08.2018 / 15:29
1
answer

When to use lists and when to use tuples? [duplicate]

What is the difference between list and tuple types in Python and when should I use each one?     
asked by 26.03.2017 / 01:27
2
answers

How to use the Django User part in a model?

I'm doing a blog and the question has arisen, how can I use the Django user system to make a ForeignKey in my author variable? from django.db import models class Category(DatastampMixin): name = models.CharField(max_length=20) acti...
asked by 15.03.2018 / 01:34