Questions tagged as 'python'

1
answer

Can you extend the admin form for my page?

I have a form created and displayed with the admin the way I want it ... however it is a site for user registration, so the user does not have access to the admin, I want the admin form to be used outside of it . In my case the option fields...
asked by 31.07.2017 / 13:58
2
answers

OS library Python - Finding Directories

I'm learning how to locate directories in Python and I came across the following code: import os dir_path = os.path.dirname(os.path.realpath(__file__)) print(dir_path) cwd = os.getcwd() print(cwd) Why does the Python language use __f...
asked by 01.08.2017 / 06:00
0
answers

Destroy a container already created in tkinter

I would like to know how I can do to destroy a container already displayed on the screen. Like this: the program loads a container with the widgets and everything. However, when I make it create another container, it puts it under the already...
asked by 28.06.2017 / 16:05
0
answers

Slugfy in query FLASK

I'm trying to slug a dice, I tried to use the lower and replace to change some characters, my query looks like this: return Person.query.get(person_id).name.filter(func.lower(func.replace(Person.name, "ç", "c")) It works, but if I get some...
asked by 29.06.2017 / 00:33
1
answer

Email with Python attachment

I have a script that sends a request mirror via email. However, it sends the attached mirror of .htm type I would like it to be sent in pdf. Below is the script #!/usr/bin/env python # -*- coding: utf-8 -*- import psycopg2...
asked by 12.06.2017 / 19:02
1
answer

Error using input method in function with Python

I have a problem with my code. I have 3 functions, one of them uses an input method called tweet but when I call the function of the error and it does not execute, maybe I did not understand this part of input methods right but I reviewed it a f...
asked by 11.06.2017 / 19:51
0
answers

Communication between Python and Java

I'm trying to create a client server application where the server will be written in python and the client in Java. The problem is that when sending a message from Java to Python the python server receives, but the opposite does not happen. Appa...
asked by 03.07.2017 / 15:55
0
answers

Python Pandas CSV

I started learning Python a short time ago and I'm doing a project to normalize client data. But I do not know how to make a comparison of type: reads the CSV field the CP7, searches for all CP7 of the CSV CTT and writes in the table PN...
asked by 02.06.2017 / 16:25
0
answers

Error: $ http: baddata Bad JSON Data

I'm finishing developing a web application but I have a problem. All my application was developed in Python, Restful, AngularJS and ChartJs. I'm importing information from the database via python and saving in a vector as per the code below: d...
asked by 05.06.2017 / 04:26
0
answers

How to pass matlab to python?

f0 = 20000; a0 = 1; alfa = 0; T1 = f0/a0; sigma1 = T1*cos(deg2rad(alfa)); tau1 = T1*sin(deg2rad(alfa)); for teta=0:1:180 tau(teta+1) = (sigma1/2)*sin(deg2rad(2*teta)); sigma(teta+1) = (sigma1/2)*(1+cos(deg2rad(2*teta)));...
asked by 20.06.2017 / 05:42