Questions tagged as 'python'

3
answers

How to capture keyboard or key combination in python3?

Hi, I would like to know how I can capture key combinations in python3 , for example by pressing Ctrl + A execute a method in a class. It's for a console program and this is what I've found so far of information. #! /usr/bin/env python3...
asked by 18.05.2017 / 16:34
2
answers

How to randomly select in python itertools.product

I would like to be able to do the following: Combinaciones = itertols.product('abcd',repeat=5) Here is where I would like you to select at random and go eliminating each time you choose not to step on it again: for i in combinaciones   ...
asked by 16.05.2017 / 16:46
2
answers

average latitudes and longitudes + python

Good morning. I have a vector with 17000 latitudes and another with 17000 lengths. Or if the same, in a vector of ordered parts [lat, lon] The idea would be that all points within an area are unified. That is, suppose we divide the map into c...
asked by 16.06.2016 / 19:41
2
answers

list index out of range when processing a csv file

This is the complete line of the CSV file where it gives the error: 21890;BH Telecom (PTT BiH, GSMBIH);Bosnia and Herzegovina If I send to print the variable split , it puts it here: 21890;BH Telecom (PTT BiH Where the comma begi...
asked by 12.05.2016 / 05:20
1
answer

How to relate an 'Object' to several 'Objects' Foreigkey

Asking for your support again, I am making an application to inventory the electrical and optical ports of various equipment, and it is not clear to me how to relate a model with several models. I have the following two objects: class ITarj...
asked by 20.08.2016 / 11:59
1
answer

Get data from a string in Python

You can help me with the next problem I have. I have the following chain: Tip:1-Cli:337|Neg:695|Pro:7558|Nom:802|Esq:1|Rub:None|Con:None|Emp:None|Com:1,Tip:1-Cli:337|Neg:695|Pro:7558|Nom:850|Esq:1|Rub:None|Con:None|Emp:None|Com:1,Tip:1-Cli:...
asked by 25.02.2017 / 00:03
1
answer

Filtering API Rest Framework Django (Extra Field FK)

I would like to be able to filter by the value of another field in the table (FK) not only by id Right now if I write link it returns the results I want , but I would like to be able to filter in the following way (for another field of...
asked by 23.05.2016 / 13:18
1
answer

Error installing Pillow on ubuntu 15.10 32 bits

The error that throws me is the following: $ pip install pillow Failed building wheel for pillow ... error: command 'i686-linux-gnu-gcc' failed with exit status 1 ...     
asked by 13.04.2016 / 09:16
1
answer

SQLite when deploying a project done in Django

I have my project done with Django and I will upload it to a server that has support for Django (obvious), but the database that I used during the development was SQLite. The Web server only supports MySQL but my question is: When SQLite i...
asked by 11.02.2016 / 20:38
2
answers

Doubt about the way to show a form

Good evening, I have a form created in the following way: (in forms) RESULTADO_P = ( ('a', 'a'), ('b', 'b'), ('c', 'c'), ('?', '?'), ) class formulario(forms.Form): r1 = forms.ChoiceField(choices=RESULTADO_P, initia...
asked by 07.02.2016 / 15:17