Questions tagged as 'python'

3
answers

add the value of the items in the list

I am practicing an exercise in Python to add the elements of a list and when I add the values I get this way by console: [1, 2] 1 3 [5, 4, 2] 5 9 11 [12, 11, 120] 12 23 143 [50, 22, 88, 80, 108] and I want the total value of eac...
asked by 02.10.2018 / 14:21
0
answers

Assignment of values to parameters in ISO 8583 with python

I am new to the creation of sockets and frames for virtual card transactions or reloads, I am currently working with python and its iso 8583 library, so I am seeing the need to see how I can assign the parameters to the library correctly , the e...
asked by 24.07.2018 / 20:42
1
answer

pyusb can not find device

I am trying to decry all the usb connected to my pc using pyusb, but I have the following problems: 1.- you can not find all the devices (there is no hdd connected at the moment of execution) 2.- How can I get the iInterface (to detect the...
asked by 22.07.2018 / 04:38
0
answers

the socket function in python is simplex (single path)?

import socket s = socket.socket() s.connect(("localhost", 9999)) s.listen(5) sc, addr = s.accept() while True: recibido = sc.recv(1024) mensaje = raw_input("> ") s.send(mensaje) print(recibido) if mensaje=="exit": b...
asked by 08.07.2018 / 05:40
1
answer

Install pip with idle

I have been asking for a while if there is a possibility to install libraries from the same IDLE, that is: import pip pip.install("asciimatics")     
asked by 16.07.2018 / 09:38
0
answers

Expand a Frame positioned with "grid ()" inside another Frame

I have an application made with Python 2.7.x and Tkinter that, among other things, has the opening of a widget Toplevel as a Messagebox custom. More or less, the code that follows is what the Toplevel in question is built in (so...
asked by 17.07.2018 / 00:17
0
answers

Lighttpd + fastcgi + python3 = child exited with status 8

I'm trying to run a small program in python: import os from flup.server.fcgi import WSGIServer from webapi import webapi from configuration import config from setup import setup if __name__ == "__main__": setup() if config.getboolean...
asked by 16.07.2018 / 20:52
1
answer

Errors and exceptions

def get(rule_name,parameter_name): try: with open("parameters.txt", "r") as infile: for line in infile: if line.startswith(rule_name.lower()) and line.split(":")[1] == parameter_name.low...
asked by 18.07.2018 / 11:29
3
answers

How to declare a ChoiceField on models.py

Good I am modifying my project and decided to place a ChoiceField but when I want to make the makemigrate I get the following error:    File "/home/jbarreto/Documentos/Misproyectos/Personal/personal/datos/models.py", line 8, in Employe...
asked by 16.08.2018 / 15:19
1
answer

Document hash with hashlib, TypeError: object supporting the buffer API required

I'm trying to make an application where I can indicate a file and its hashes (SHA1, SHA256, md5). The problem is that when it comes to removing the hash, I get the following error, referring to a missing API:    Traceback (most recent call...
asked by 02.07.2018 / 19:05