Questions tagged as 'python'

1
answer

how can I change the event KEYDOWN to key_o? without error

What happens is that I saw this code and I was working for a while, but when I try to change KEYDOWN To K_o I get an error that the key is not defined can you tell me why I can not change it or how do I change it? import os import pygame, rand...
asked by 26.09.2017 / 22:54
2
answers

Save data from a .txt [closed]

Good to everyone I have a question about how to save the data of a .txt that are in such a way: Data 1 1.0 2.0 1.0 3.0 2.0 3.0 Elements 1 3.0 32.0 4.1 54. 6 Data 2 2.2 1.0 23.0 9.0 32.0 2.0 Go saving them in different...
asked by 26.09.2017 / 12:28
1
answer

Problem with Type error object take no parameters

I have the following script: from record import record class cliente(record): nombre = "" codigo = 0 ultimapelicula= None habilitado = True class pelicula (record): nombre="" codigo = 0 ultimocliente = 0 habilitada = True de...
asked by 17.09.2017 / 05:42
0
answers

Manipulate a UserForm in Excel with Python [closed]

I have a button on an excel sheet that calls a form with several things like radio buttons, listbox, etc. I'm looking for ways to manipulate the comboboxes inside the form with a Python script but I have no idea how to do it. I have been p...
asked by 15.09.2017 / 05:16
2
answers

Consume rest service

I am trying to consume a rest service but at the moment of doing it, it sends me an error. I leave below the code I am occupying. import http.client metadatos = {a:1, b:2, c:3} conn = http.client.HTTPConnection("10.133.xxx.xxx")...
asked by 13.09.2017 / 18:35
2
answers

What reserved word is there in python to make any variable constant? [duplicate]

I want variables to be constant as "final" or "const" in other programming languages such as C ++ or java but not found in python.     
asked by 05.09.2017 / 03:47
0
answers

scrapy splash login formdata input array name

I can not do the login of a form because the name of the inputs is as array, example: <input name="login[username]" value="" id="email" class="input-text required-entry validate-email" title="Dirección de email" type="text"> and <...
asked by 15.09.2017 / 04:20
1
answer

Python / MongoDB - Problem with query including "OR" & "LIKE"

I have the following code that according to user information of a HTML form looks for a record in the MongoDB database: # -*- coding: utf-8 -*- import json from pymongo import MongoClient Conector = MongoClient('localhost:27017') Usuario_...
asked by 14.09.2017 / 16:52
1
answer

Error loading file in html form

I am creating an application using django where files should be uploaded and these will be saved in the folder of a project. The problem is that when I fill out the form from the admin of django it allows me to save the file without problem...
asked by 24.03.2018 / 21:55
2
answers

Help with project to connect Arduino and web server

I'm trying to do a project where I want to move servomotors from a web and I can not do it. The server is a Raspberry Pi and I want to move the servomotors with some sliders. The thing is that for the servomotors to move I have this code on the...
asked by 27.08.2017 / 23:32