Questions tagged as 'python'

3
answers

Countdown using tkinter

I'm trying to design a program on tkinter to do a countdown. I can not understand why I can not get Entry and turn it into an integer. (As this is just a test, I did it using Portuguese myself) from tkinter import* root = Tk() inicio = En...
asked by 26.06.2016 / 21:13
1
answer

Crossword vertical

Problem: Writes a function called find_word_vertical that accepts a list of 2 character dimensions and a string as input arguments. This function searches the columns of the two-dimensional list to find a word equal to the input word. If an eq...
asked by 05.03.2016 / 23:00
1
answer

Forms Session

What I did I have a view that calls a template with a form. In a certain case, I need to save some data in the session scope and send it to another url - which will call another view and another template. My Problem I created the sessio...
asked by 11.12.2015 / 14:02
1
answer

Python: unsupported operand type (s) error for /: 'tuple' and 'int'

Hi, I have a problem with a function in Python, which involves a tuple of tuples. When executing this assembly function calling the tuple of tuples votes: votacoes = ( (0, 15729, 220408, 1297, 0, 3040, 993, 0, 1354, 1046, 0, 3284, 99652, 1...
asked by 08.11.2015 / 16:24
2
answers

ignore in function call if empty

suppose I'm feeding a function with a tuple: a = ['c:/', 'd:/', 'x:/', 'y:/'] b = ['c:/data', 'd:/data'] funcao((a, b)) however if you have a list that is empty you would like to ignore example: funcao((se_vazio_ignore(a), se_vazio_ignore...
asked by 25.07.2016 / 20:49
1
answer

Problem with urllib

I'm trying to solve python challege # 4 but when I run my possible solution I get an error. My solution is as follows: import urllib, re pattern = re.compile("and the next nothing is \d") text = "and the next nothing is 12345" nothing = int(...
asked by 07.10.2015 / 01:02
1
answer

Integration AngularJS and Django forms to write data [closed]

How are you handling the integration frameworks in JavaScript with forms
asked by 01.10.2015 / 19:53
1
answer

Licensing of programs made in Python

Because it is an open programming language, will any software created from it open? Or is it possible to develop closed operating systems?     
asked by 25.07.2015 / 22:36
1
answer

Insufficient Permission with Google calendar api v3 using python

I'm not getting permissions to create the event. Below the code I'm using: import httplib2 import os import json from apiclient import discovery import oauth2client from oauth2client import client from oauth2client import tools import date...
asked by 27.07.2015 / 17:07
1
answer

Wrap strings using struct

I'm doing a basic exercise using the struct module, and I came across a problem: To wrap a string , we should enter in the struct.pack() method the number of characters it has, right? But what if this string is informe...
asked by 05.07.2015 / 05:36