Questions tagged as 'python'

0
answers

Accept X-CSRFTOKEN XAMPP Django

Good morning: I am trying to connect an application in Django with a service in PHP with an xampp as a server. I am sending you the data from a View in Django with a: return redirect('enlace',{'parametros':parametros}) This generates thi...
asked by 29.01.2018 / 11:19
0
answers

Receive Notifications in Market Payment with Flask

The documentation indicates that we can receive a post of market payment in Python this function: def index(req, **kwargs): mp = mercadopago.MP(CLIENT_ID, ACCESS_TOKEN) paymentInfo = mp.get_payment_info(kwargs["id"]) if paymentInfo...
asked by 29.01.2018 / 11:18
0
answers

how it works matplotlib functions (beginner)

When one works with the library matplotlib.pyplot a simple code example would be: 1 a=[1,2,3,4,5] b=[1,2,3,4,5] plt.plot(a,b) plt.xlim(0,100) plt.show() 2 a=[1,2,3,4,5] b=[1,2,3,4,5] fig=plt.figure() ax=fig.add_subplot(111) ax.plot...
asked by 31.01.2018 / 05:31
2
answers

Dictionary to csv File (Python)

my problem is that I have a csv file which happened to a dictionary. At the moment I want to pass this dictionary to a new csv file, the information is written but leaving a blank row, that is: Instead of being like this: 'example 1': 'h...
asked by 31.01.2018 / 01:34
0
answers

Make calculations with data from other tables

Help please, I have three tables (Period, News and Liquidation) with the following information, the tables are configured as classes in ORM Sqlalchemy: > Periodo: # con los campos id_periodo(int)(pk) num_periodo (int) nombre_periodo(varcha...
asked by 26.01.2018 / 19:50
1
answer

Move window without borders

Good afternoon community. I would like someone to help me with the following code: import tkinter as tk root = tk.Tk() root.overrideredirect(True) w, h = 800, 500 canvas = tk.Canvas(root, width=w, height=h, highlightthickness=0) canvas.pac...
asked by 30.01.2018 / 17:44
0
answers

Failed to save to directory from Python

I have the following code. The goal is to save some graphics in pdf format in a directory that I created using os.mkdir ("...") but I get the following error: IOError: [Errno 13] Permission denied: '\ enva1.pdf' I do not know if the bug is...
asked by 27.01.2018 / 18:14
0
answers

read a specific area of a pdf with python

Someone knows how I can read a specific area of a PDF with python. I am currently using PyPDF to read and extract the text but if in the pdf there are no separations the text runs out and I can not do a clean regex. I hope you can help me....
asked by 24.01.2018 / 22:24
1
answer

Looping in dictionaries

I have a problem with dictionaries in python. How do I get the key to a dictionary from the value? That is, if I had a dictionary of the form; d={"key1": {"key2": {"e":5,"f":8,....,"z":10}}} and I want to know which key contains t...
asked by 25.01.2018 / 13:36
0
answers

Python: class method returns empty list

I am trying to practice a bit of Python in my free time, and for that I apply the problems of the university to the reasoning in this language. I am trying to calculate contours and everything is fine until I try values to the running method, fo...
asked by 23.01.2018 / 04:05