Questions tagged as 'python-3.x'

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
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
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
1
answer

what value isAlive (), when a python 3.x process ends?

When it is alive, an isAlive process takes the value of True but when that process ends what value does it take? When I code if t.isAlive == True: if it works because the process is alive but when if t.isAlive == False: does not...
asked by 24.08.2017 / 21:16
1
answer

Problem with re-dimensioning a matrix

Good, working with the numpy library in python, I discovered the following problem, when I assign a auxiliary matrix to the main matrix , the latter takes the size of the auxiliary matrix , this being the problem . Below is an example....
asked by 03.11.2017 / 15:41
1
answer

Use str.split () to select parts of a string separating by consecutive spaces

I am receiving some lines of log, to which I generate a header with the data of some of the fields, as the first ip in the line. To do this use a split of empty spaces and so I could select the information I wanted to use in the header. Bu...
asked by 16.10.2017 / 15:46
0
answers

Can I use any library in python scripts to work with bitlocker? [closed]

I'm starting programming with Python 3.6 and I'm looking for a way to make a script with which I can activate, deactivate, block and unblock bitlocker through a program with Python, but I do not know what I must use to work with bitlocker ....
asked by 23.07.2017 / 11:19
1
answer

represent in Json a filter (). values ()

Friends, I've been trying to represent this in json but I could not miguel <QuerySet [<Libro: hunger games>, <Libro: sherlock holmes jose <QuerySet [<Libro: divergente>, <Libro: sherlock holmes>]> this is the c...
asked by 08.09.2017 / 17:42
1
answer

How to get support in sklearn.metrics.classification_report

I am using sklearn.metrics.classification_report and I would like to isolate the support values to work with them separately, but I do not know how to extract them. I made the call with print(classification_report(y_true, y_pred...
asked by 23.05.2017 / 22:56
1
answer

Python does not update the value of the database with PyMySQL

Code : import discord import asyncio from PyMySQL import pymysql # Código sin importancia if message.content.startswith('!points'): clist = message.content.split(' ') if len(clist) > 1: # Código sin importancia else:...
asked by 30.08.2017 / 19:11