Questions tagged as 'python'

1
answer

Run script in python every second

Friends I am developing a script in python, I think this compile to .exe. and for that I'm using cx_Freeze. Now in my .py I want to develop a function that I run the script automatically every 5 sec and for this I am using: scheduler = Sche...
asked by 01.04.2016 / 23:29
2
answers

How can I create another object without taking the same values?

I have my graph implementation program. The issue is that I would like to try other graphs with the same classes but to declare more graphs I always print the same. But I have no idea how this is done in Python, could someone advise me? class...
asked by 20.03.2017 / 22:16
1
answer

Which item was sold less in Python [closed]

I have a list of tuples: Tupper 11.4*5.6 cm, 2000, 30, 1400 He asks me to show which are the items that were sold in less quantities. (row 3, is the one that indicates the quantities sold) I do not know how to follow the idea, I think it...
asked by 07.12.2018 / 12:36
1
answer

How to display a menu only for users of a group in Django?

I'm doing a project with django and I have the following query in the admin of django I created the group "Volunteer", to which I gave permissions so you can manage dogs (create, modify, delete) Well now in the template, I have a button...
asked by 27.11.2018 / 18:41
1
answer

Login in form with Python CSRF

I am trying to log in to Facebook with an application made in Python . This same code used for this forum I have to say that it works for me, it logs me perfectly. As you can see in the code I have a part in which I create the token cookie...
asked by 11.12.2016 / 01:42
2
answers

Get a Twitter user's timeline with tweepy

I have to get the timeline of my twitter profile and the one of a user that we want with tweepy and take the date , the author and the text or. I have the following code, but it shows me only the text of my timeline: import tw...
asked by 10.12.2016 / 20:42
1
answer

HOW DO I SOLVE IT? I get an error in line 110, in module Action_List (4) NameError: name 'Activity_List' is not defined?

# importando modulos necesarios import matplotlib.pyplot as plt import numpy as np import seaborn as sns import random as rm #Estados(Nodos)-->4 EVENTOS Estados=["Dormir","Entrenar","Correr","Jugar"] Lista_Actividad=[] #Posibles secuencia...
asked by 14.11.2018 / 01:12
1
answer

Add, concatenate object to a queryset in django

Today I want to share this solution to add elements to a django queryset def Caracterizacion_estudianteUpdate(request, estudiante_id, caracterizacion_id): caracterizacion = Caracterizacion.objects.get(id=caracterizacion_id) estudiante...
asked by 14.11.2018 / 06:55
1
answer

AttributeError (The 'NoneType' object has no 'name' attribute)

Here I have 2 tables the first one is for products and the 2nd one is for price, in the price table I call the product name but I get an error, please help models.py class Producto(models.Model): """Productos a la venta""" nombre...
asked by 20.11.2018 / 23:48
2
answers

traverse a file reading line by line with a stop condition

I have a login.txt file with this structure DirServer Usuario Passwd RutaDescarga RutaServer Patron # DirServer Usuario Passwd RutaDescarga RutaServer Patron # DirServer Usuario Passwd RutaDescarga RutaServer Patron How can I go through the...
asked by 14.11.2018 / 12:48