Questions tagged as 'python'

2
answers

Flask - sending form return to another function

Below is my default.py where I define the end-points; What I'm trying to do is grab the FORM information that is in "/" send to return_request () and show the result of the Request in / output " def return_request(endPoint): headerInfo =...
asked by 08.05.2018 / 17:06
2
answers

Scrapy xpath href or span within div

Hello, I'm trying to make a scratch where I have to get a link and a text, but I'm having a hard time because of page variations. I have 3 possible variations: 1. <div> <strong> <span style="font-family: arial, helvetica,...
asked by 06.05.2018 / 00:04
1
answer

Passing several attributes in django

My question is the following. I am starting my studies in django and encounter a problem. I have a function in my view with the following excerpt def saldo_total(request): receitas = Receitas.objects.aggregate(Sum('valor')) total_recei...
asked by 05.05.2018 / 22:58
1
answer

How to add a sheet to a pre-existing xlsx file with pandas?

Follow my attempts. And still unsuccessful. import pandas as pd def data_frame(): return pd.DataFrame([{'link': 'http://brito.blog.incolume.com.br', 'title':'Blog'}{'link':'http://google.com', 'title':'Pesquisa'}]) def toExcel0(): d...
asked by 16.05.2018 / 20:29
3
answers

How to create a "* .exe" executable in python?

I need to turn ".py" files into ".exe" executables to run on any Windows desktop. Currently use 3.3     
asked by 24.04.2014 / 04:27
1
answer

math domain error in PYTHON

I know that if the root is less than zero it will not exist, but, something happens, even though I implement that if the delta value is less than zero it is to write the error it still continues showing "math domain error "I do not know the reas...
asked by 01.05.2018 / 23:48
1
answer

Receive a long String with a esp 01

I have a esp 01 (wifi module) connected in my Arduino on port 2 and 3 (TX RX), I can send a large String, but when I receive it I can only receive a maximum of 32 characters, here it is the code of my Arduino: #include <SoftwareSerial.h>...
asked by 29.04.2018 / 22:37
1
answer

Django - select options

I'm trying to put the names of the coordinators in the options of a select looking for the database, I've already researched and it seems that there is another way to use the select in django, but it was not very clear, so I'm posting here my co...
asked by 08.05.2018 / 00:45
1
answer

Python - Error in use of import, module - has no attribute

Hello, I'm writing the code for a university project, but when I try to import dependencies for some files, Error. I created some packages that have files that have dependencies, but they do not find those files. The project is all in gith...
asked by 05.05.2018 / 02:08
0
answers

How to use smtp lib with values coming from a form?

I have two files the idea was to get the data from form.py and use it to send an email with smtplib follows the codes form.py: #!/usr/bin/python # cabecalho que informa o browser para renderizar como HTML print "Content-Type: text/html\n\n" #...
asked by 05.05.2018 / 03:26