Questions tagged as 'python'

2
answers

Tkinter focus on a window ignoring the back?

In my code there is a frame with a button and it is called "Open", clicking "Open" will bring up another window. The problem is that if I click on the window that is the "Open" button again, it will open a new window. What I want is to be...
asked by 25.06.2014 / 13:24
1
answer

How to filter, select and count data in a pandas.DataFrame?

How to get multiple records based on multiple columns of a given name? My dataframe looks something like this: import pandas as pd df = pd.DataFrame([["1111", True, True, False, True, True], ["2222", True, False, True, T...
asked by 24.09.2018 / 19:01
1
answer

Django generating strange code

I'm using visual studio community and I created a web project with Django, but when I make the homepage, it's generating this code: AndthecodeIhaveisthis:{%loadstaticfiles%}<!DOCTYPEhtml><html><head><metacharset="utf-8"...
asked by 06.05.2016 / 04:07
1
answer

Digital Signature of NFE (Electronic Invoice) [closed]

I'm developing the NFE in the Python language, I already generate the XML, I can send it to Webservice and I get the answer, what I need now is the digital signature The signature is an xml tag with some values, follow the template <NF...
asked by 29.09.2015 / 21:57
3
answers

How to identify if a string is a palindrome?

A palindrome is a word or phrase that has the property of being read from right to left or from left to right. For example, strings "aaaaa" , "1221" , "bbaabb" are palindromes, however the string "chef" is not a palindr...
asked by 28.03.2016 / 21:53
1
answer

numpy.diagonal returning read-only copy even in version 1.10

I'm doing a program in Python where I need to change the diagonal values of an array. The following code snippet should be sufficient to understand the general idea (it changes to% w_ of% the value in the first position of the main diagonal of t...
asked by 28.10.2015 / 20:17
2
answers

How to install pip for a particular version of Python?

I have ubuntu 17.10 installed and it came with Python 2.7 and 3.6. I installed Python 3.4 but I can not install the pip on it, it always goes to the latest version with pip3 which is 3.6 How can I install 3.4?     
asked by 23.10.2017 / 18:49
1
answer

How to simulate a time trial with tkinter?

I'm developing a python game "Who wants to be a millionaire" and wanted to put in the game the "time trial" to appear the time while we answered the question and when the time is over and the question has not been answered the program ends "game...
asked by 14.01.2015 / 16:47
1
answer

How to create immutable objects in Python?

Based on this question , is it possible to create your own immutable objects / classes in Python, in the sense that, by default, this my object will be copied when passed as an argument to a function? If possible, how?     
asked by 25.09.2014 / 16:36
2
answers

UnicodeDecodeError: 'utf-8'

I'm having UnicodeDecodeError: 'utf-8' problems in a python file and I'm not able to solve it. This is the error: Traceback (most recent call last): File "file.py", line 448, in <module> fileOriginal.sliceFile(url) #Separa os arqui...
asked by 23.05.2016 / 22:37