Questions tagged as 'python'

1
answer

Separate result in different worksheets

I have a problem in which I have to get all my information (information from each cell of the worksheet), make them go through a condition and for each condition result write to a new worksheet of a new file. For example, I have the test.xls...
asked by 03.09.2014 / 15:31
2
answers

How to use two decorators in Python?

How can I do to use two decorators in python, as in the example below: @makebold @makeitalic def say(): return "Hello" that returns: <b><i>Hello</i></b> I'm not trying to make HTML so in an actual application...
asked by 21.08.2014 / 17:47
2
answers

Full file path in Python

I'm using the os.listdir() method to return a list of all files, however the return is just the file name and I'd like it to return the absolute path, does anyone know any way? The os.path.abspath() method is not working because...
asked by 19.05.2014 / 04:32
1
answer

Attraction of objects in python

I'm writing a code where one image goes towards another one that for some reason is not working. I take the distance between them by calculating the force of gravitational% with% of attraction between them and decompose the resulting vector i...
asked by 08.05.2015 / 22:03
2
answers

Manipulation Directories java / python / c

I have a directory A, and this directory A has several subdirectories, and in each subdirectory, it has a variety of files. I would like to put the all files in a directory in the order they are in subdirectories, any idea how can I do this in j...
asked by 19.02.2014 / 05:01
1
answer

Find the most repeating value

I'm trying to analyze a shoe sales data, but I'm having a hard time creating a function to find the number that the customer bought the most in the previous year. I have a table with this data: Cód. Cliente CPF Nome...
asked by 29.08.2018 / 19:46
1
answer

How to manage the running and failure to execute the Spiders?

I'm developing a module to get information about spiders running on the company system. Here is the template where we saved the start of operations and the job. I would like to validate if the jobs were done correctly and fill in the rest of the...
asked by 12.01.2015 / 17:48
1
answer

How to modify an element inside a list in Python?

I have the following list: pessoa=("Filipe", 40, True) I write the print command for each element: print(pessoa[0]) print(pessoa[1]) print(pessoa[2]) The answers are: Filipe 40 True When I try to modify the first element: pessoa...
asked by 10.02.2018 / 07:52
1
answer

Image overlay on Tkinter

I have a problem trying to overlay an existing image in Python 3. from tkinter import * jan = Tk() jan.geometry("500x500") jan.configure(background="#f0f0f0") head = PhotoImage(file = "rosto0.png") label = Label(jan, image = head) label.place...
asked by 28.07.2018 / 13:07
1
answer

Error executing script in python in Laravel controller

Currently my scripts work perfectly within the schedule that run at specific times within my server's cron. The problem is occurring when I try to execute the method inside the controller, this method basically uses a shell_exec () that e...
asked by 29.06.2018 / 22:36