Questions tagged as 'python'

2
answers

Selenium Python

I'm having trouble manipulating popup. It appears that the popup code is generated in real time, not being captured by selenium. In fact, it is possible to see the use of jQuery, I did not detect Ajax, but quite capable of having it too.    Q...
asked by 08.12.2015 / 18:02
1
answer

Do extend list to another list

Well I have two lists of lists, list1 and list2: lista1 = [['carlos','10','cenouras','carro','agora'],['duarte','34','couves','bus','agora']] lista2 = [['11:30', '12:00'],['13:00', '13:30']] What I want is to create a new list with the fi...
asked by 09.12.2015 / 00:50
1
answer

NameError on get_special_folder_path

I did a little test in Python 2.X to try to copy a file from the folder that the script is to the Windows startup folder: import shutil import sys, os startuplocation = get_special_folder_path("CSIDL_STARTUP") shutil.copy('fototest.jpg', star...
asked by 03.01.2016 / 01:32
1
answer

Why does not kwargs accept a keyword? [keyword can not be an expression]

In python there is the kwargs , which makes things much easier , when I need to name parameters. define what are the attributes of an element that I will create with this function I have a function where the second parameter I use a kwargs. How...
asked by 15.01.2016 / 16:04
2
answers

How to insert an array into a variable?

Realizing that it has a lot of repetitive code I decided to automate it by creating a looping of reading the cells of my excel file. #row cell fixa para o horario rows = ts[1].rows cells = rows[1].cells #Segunda 7h40min - 8h30min cell = cells[...
asked by 01.04.2015 / 01:50
1
answer

Error: IDLE stops working after closed

I have a lab with 35 machines running Windows 8.1 Pro. After installing Python (Version 2.7.9 64bits) on all machines, I run into the following problems: Some machines install normally, but IDLE can not be opened. When you click on the shor...
asked by 16.03.2015 / 14:01
1
answer

What is the best way to organize views in Django?

I have views.py in my study project where I group it from methods to represent views (methods that return HttpResponse), to generic class-based views (such as DetailView, ListView). I was thinking: what are the best practices for organizing v...
asked by 06.02.2015 / 00:52
1
answer

Get self variables from another class and custom event

Read only comments in Portuguese, the question of self is in comments in the code, now the events will be down there. class LOL: class Champions: class MasterYi: def __init__(self): #YiAttributes...
asked by 02.01.2015 / 14:11
1
answer

String error in a function in Python 3

When I try to run the def of an error in the part of texto[x][y-1] , giving the following: erro:TypeError: 'str' object does not support item assignment Could anyone help me please? def moveJogador(mapa, mov): if mov == "c":...
asked by 06.05.2015 / 17:50
2
answers

Change value of a label dynamically

I'm a beginner in Python. How do I change the value of a label dynamically? To be more specific, I have the following code: #!/usr/bin/env python from Tkinter import * import socket, webbrowser root = Tk() root.title("Test - waghcwb") def...
asked by 27.07.2014 / 09:33