Questions tagged as 'python-3.x'

1
answer

Get list of child nodes in XML

I have a problem with a Python exercise in which I have to use an XML file, the statement is this:    In a list we have different province identifiers, show the name of the provinces and all the municipalities corresponding to the identifiers...
asked by 15.02.2018 / 18:02
2
answers

Filter queryset by group

I have a model called ColaNotificaciones. class ColaNotificaciones(models.Model): class Meta: unique_together = (('remitente', 'destinatario', 'asunto','producto'),) remitente = models.CharField(max_length=20) destinatario...
asked by 12.02.2018 / 11:50
1
answer

Draw polygon and point

I'm calculating the distance between a point and a polygon from shapely import wkt polys = ('POLYGON((-58.612406970999984 -34.55196600599993, -58.61272573499997 -34.552244351999946, -58.611851334999983 -34.552907077999976, -58.611473561999958...
asked by 05.04.2018 / 16:25
1
answer

Fit a background image in python

I have a problem I want to adjust the background image to cover the entire interface, but I move the size and sometimes if you show it to me and other times you can help me in this detail please from tkinter import * from tkinter import Tk...
asked by 03.04.2018 / 03:31
1
answer

Redirect Django with paramentros

I'm running a payment gateway in Django and I'm trying to split the procedure into two views, one makes the call and gets the answer and the second processes the response. Right now my code is something like this: def comprar(self): ......
asked by 02.04.2018 / 16:34
1
answer

Get list of integers using stdin.readline ()

I use this the following entry to enter a list of numbers, for example this list: 1 2 3 4 5 6 a=stdin.readline().strip().split() If I give you print(a) it shows me ['1','2','3','4','5','6'] , my question is if you can modify th...
asked by 31.01.2018 / 07:06
1
answer

read several lines in python 3

Nesesito read several lines in python 3, I have this without pressing ENTER: Love Rome Hello Hello Occasionally Staging bear dog Possessionary Possession Colombia Locombia Mommy Mommy and I need python to read me all the lines and print me in a...
asked by 20.01.2018 / 20:27
1
answer

Error writing to file, you can not concatenate str a bytes

I've done a simple tcp server in Python and what I want to do is save the client's messages in a text file. What happens is that when I try it, it means that you can not concatenate bytes to string. Would they know how to do it? This is th...
asked by 02.02.2018 / 17:45
1
answer

how to limit the sending of emails in django

Good morning: On the website that I am developing, send an email to the owner of the product every time another user puts it in favorite and I have found that if you start clicking many times it will not stop sending emails to that person wit...
asked by 27.12.2017 / 17:16
1
answer

Python3 - NameError: name 'select_range' is not defined

I try to create a package that contains the main.py module and two folders (Menus and Calculations). The main_3.py module contains: # -*- coding: utf-8 -*- # main_3.py # Importación de módulos import Menus.menu_seleccion_valor import Menu...
asked by 24.12.2017 / 21:11