Questions tagged as 'python'

1
answer

Browse files in Python

I'm trying to make part of a program in which you get the typical login screen or create an account. The create account part I have made, making the user's information is saved in an external file, however, at the time of doing the part of login...
asked by 30.07.2018 / 14:08
4
answers

Display data with ListView with Django 1.8

I am using Django 1.8 with Python 3.4, I need to show the data of a table with ListView but it does not show me anything or show me any error. Here is the code: models.py class Tipo_almacen(models.Model): descripcion = mod...
asked by 21.01.2016 / 02:33
2
answers

Error in Python: NameError name XXX is not defined

I am new to Python and I am doing some test exercises, and I am having problems in one that I have invented. I want to collect names, put them in a vector, and sort them. This had been done before with numbers, but without a while (ask...
asked by 05.07.2018 / 21:15
2
answers

Error when using "self": "NameError: name 'self' is not defined

When trying to execute my code, it sends me the following error:    [NameError: name 'self' is not defined] This happens to me every time I use self . This is my code: from tkinter import* class __init__(self,contenedor): se...
asked by 30.08.2017 / 21:27
2
answers

Do not show the output of a command in python when you use os.system ()

I'm trying to make a program that sends a ping to a certain number of IPs that the user enters through the terminal. for example: python programa.py 10 20 I think it is appropriate to mention that the computer on which this tool is going to...
asked by 12.07.2018 / 01:44
1
answer

I can not get the character to be drawn on the screen

I'm trying to make my character ( imag_1 ) draw on the screen but I can not get it. This is my code: import pygame from pygame.locals import K_LEFT, K_UP, K_RIGHT, K_DOWN import os import sys # Variables imag_1 = pygame.image.load('prue...
asked by 11.05.2018 / 05:24
2
answers

Formatting pyramid panda dataframe

I have a set of business tax identification data. from io import StringIO import pandas as pd csv =StringIO(u'''\ NIT, TYPE 8600219985, company 9001899451, company 19479647, person 19065171, company 79896134, person 87111760819, person ''')...
asked by 10.05.2018 / 21:46
2
answers

Group consecutive duplicates in python

I am wanting to do a grouping of rows in a dataframe, but only of the consecutive ones. To put it more clearly, I give an example: ip_src ip_dst packet_length src_port dst_port comm_type 0 192.168.0.7 52.31.84.22 28...
asked by 15.05.2018 / 05:13
2
answers

Why do I get ERR_TOO_MANY_REDIRECTS?

I was working with a web that I'm doing, it has a kind of login and this error appeared, I redirect them with header. This page does not work The mivhost.com page has redirected you too many times. Delete cookies ERR_TOO_MANY_REDIRECTS <...
asked by 23.08.2018 / 10:28
1
answer

Save image to disk from a NumPy array

I have the following exercise:    a. Write a function that implements the gamma transformation of a grayscale image. The    function must receive as input parameters: a grayscale image (uint8) and the parameter    gamma. The output parameter...
asked by 27.08.2018 / 15:32