Questions tagged as 'python'

1
answer

How to get a specific data type from a text file

I have a text file, structured as follows 1 Name CPF Address Phone I would like to know how I can get only the lines that contain integer, in this case the code (identified as 1), since I am trying to do an auto increment in pytho...
asked by 17.11.2017 / 23:15
1
answer

Generate pdf file from a pdf object

I'm interested in doing crawler to work with pdf , but I hit a doubt here. Home I need to download pdf files from a url in python, when it has a .pdf it's easy and with no problems, but when it's a objeto pdf I...
asked by 13.11.2017 / 19:22
2
answers

Separating using the + sign when reading user data

Excuse me for the basic question. It's just that I do not understand when we have to use + in Input . Here is an example of a command below. Why does not my code work when I put str(i) between commas? i = 1 textos = [] text...
asked by 13.11.2017 / 15:46
0
answers

Create a table in django's User models!

Well, I would like to create a column in the django models User table, because I would like to get the password before django transformed into sha256, because I want to display it in the unencrypted browser. Can you do that?     
asked by 13.11.2017 / 22:09
1
answer

Save the data in a polygonfield

Good evening, I'm implementing a project using django and I have the following model: class ModelExample(models.Model): city = models.CharField("Cidade", max_length=100, blank=True) state = models.CharField("Estado", max_length=2, b...
asked by 30.11.2017 / 22:59
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
0
answers

Datatables + web2py

I have a table that shows results of a search in the database and I use the Datatables plugin to assemble the pagination. The problem is this: if you pass 500 records the business is slow (Almost every search I make passes easy 500 records)....
asked by 08.11.2017 / 16:45
0
answers

Spline interpolation in python?

What is the best method to do a second-order spline interpolation in Python? I already used interp1d , but it's not quite what I want. Example of what is intended. from scipy.interpolate import interp1d import matplotlib.pyplot as...
asked by 07.11.2017 / 13:04
1
answer

List files from a folder using os.listdir

I want to list the files in a folder using os.listdir in Python but it does not return anything. The code I made: import os def rename_files(): # (1) obter nomes de arquivos de uma pasta file_list = os.listdir(r"C:\FotosUdacity...
asked by 09.11.2017 / 01:11
1
answer

Find more than one default re python?

I'm trying to rename files using regex in python, with only one default works: def new_string(pattern): text = pattern.group().lower() renturn "{}_{}".format(text[0], text[1]) regex = re.compile(r"[a-z][A-Z]") for x in files: prin...
asked by 12.11.2017 / 17:08