Questions tagged as 'python'

1
answer

Files limit per folder - Django 1.7

Does Django 1.7 provide any upload control mechanism per folder? I say this because when the number of files in a folder gets too large it tends to slow down. An example would be: Every 800 files in a folder, a folder is created at the root o...
asked by 27.03.2015 / 11:33
1
answer

Implement queues to manage competition between spiders in Scrapyd

Is there any way for Scrapyd to create queues of spiders so that when I send many spiders (with different functions) I can privilege / limit the competition between them? Today, all the Spiders I send execute in the order set by the Scrapyd serve...
asked by 09.01.2015 / 21:08
1
answer

Error in font python 2x

I'm trying to create separate sources for my project in a given .py file, after creating them I import to the project.py, I do this as follows: font.py  """ Criando as fontes. """ def fontes(self): self.font1=("Arial", "60") project....
asked by 15.08.2014 / 15:16
1
answer

Django - Error saving to Database

The data is not being saved in the Database and Django is not generating Error, but when I create an object of Livro and try to save by the shell it returns me the following error:    ValueError: invalid literal for int () with base 10...
asked by 13.05.2014 / 22:50
1
answer

Python - HTTP Digest Authentication with urllib2

I needed to authenticate on a test server to consume a service in a webservice, I was able to make the authentication and generate the xml with the following code based on a code SOen operacao = 'consulta' Agencia = "X" Agente = "X" Origem =...
asked by 16.06.2014 / 19:39
1
answer

Getting Elastic Beanstalk Event Detail with Python and Boto

I have a deploy script done with Fabric and Boto to make application deploy in AWS Beanstalk and would like to print Event Details generated in beanstalk on the terminal during deploy. Does anyone know if this is some...
asked by 28.08.2014 / 22:52
1
answer

How to generate a username by reference to its real name?

I have a question on how to automatically generate user names from the user's real name, so that the result is a reference to the real name. Knowing that the method should be called by telling the person full name and the minimum character...
asked by 02.12.2014 / 18:49
1
answer

Is there a way to format a Python Traceback?

Is there any way to format Python Traceback to get a better reading of the error request? For example, I received the following request in my traceback: "<WSGIRequest\npath:/admin/verificacao/verificacao/1849/,\nGET:<QueryDict: {}>,\n...
asked by 03.09.2014 / 19:03
1
answer

Check execution time with timeit

I need to check the runtime of a function using the timeit module of Python 3, however it does not accept that I pass the value inside the function by a variable. If I replace the line: tempo = timeit.timeit("comp_string(string, 'Fre...
asked by 05.02.2014 / 18:42
0
answers

Remove image background with tkinter

I'm trying to make two layers with two images in which the background stays entire in the application, and the second layer overlaps. The second is transparent, however, when the display occurs, it places gray background. How can I get this fund...
asked by 16.11.2018 / 04:29