Questions tagged as 'python'

1
answer

Aptana studio 3 in python does not show exit window

I just wrote: print "HOLA" and it shows me:    Finding files ... done.   Importing test modules ... done.   -------------------------------------------------- --------------------   Ran 0 tests in 0.000s   OK     
asked by 21.02.2017 / 20:17
0
answers

Calculate times from n previous records in pandas

Work with Python 3.5 and Pandas 0.19.2 I describe my problem: I have in a data frame different idactants sorted by date and time in ascending order. Well, I have a field called Result whose values are NaN or 1. I need to calculate for each row h...
asked by 06.02.2017 / 19:44
2
answers

Datepicker bootstrap in Python (Django)

The basic implementation of the Bootstrap Datepicker works correctly, what does not work is the datesDisabled (deactivate dates): My forms.py: class BookForm(forms.ModelForm): class Meta: dateTimeOptions = { 'format': 'dd/mm/...
asked by 28.01.2017 / 20:23
2
answers

Array to list with sublists

I am trying to convert an Array to a list of sublists, such that: input: '004013087631908524907452613506180379198735046740200801375849102802367495060021030' output: [[0,0,4,0,1,3,0,8,7],[6,3,1,9,0,8,5,2,4],[9,0,7,4,5,2,6,1,3],[0,6,1,8,0,3,7,9...
asked by 03.02.2017 / 14:03
1
answer

Help with subprocess.check_output command

I have to make a program that takes the list of files from a directory and save them in an array to see if they are files or folders. I have the following code: #!/usr/bin/python import subprocess, os array = subprocess.check_output(["ls","-a"...
asked by 14.02.2017 / 00:27
0
answers

About writing output of an Enum in Graphene

I am working with graphene and graphene-django and I have a problem with a field, that the values of choices are a number. When making a query, the result is "A_1" and it should be 1 (integer). For example: class Foo(model...
asked by 26.01.2017 / 19:57
1
answer

Create a new field within a table and enter the value of another but taking the value of a previous row

I would like to do the following: I have a table with several fields 'IdActive, Date, Close' and I want to add another new field 'Closure_1' which I want to introduce the values that are in the Closing field but taking the value before the recor...
asked by 20.01.2017 / 12:21
1
answer

Error importing my script in python

I have the main file and my own function that I want to add. And he sends me the following error. The function path is fine and the function in the main file does work. self.lbl = QLabel(self) TypeError: arguments did not match any overloaded...
asked by 27.02.2017 / 21:33
1
answer

Arecord voice recognizer and python

I am trying to develop a voice recognition system and I need to record "loose" words through a Raspberry-like plate. The fact is that I need the program to listen to a word (record it), and then when it has stopped talking or saying the word...
asked by 16.02.2017 / 18:22
1
answer

How to maintain the style and format in excel from python

Hello, good night, everyone. I'm working on a project with Excel and Python. In this case I have to make some modifications to an xlsx file. But this file comes with a certain format and style in each of its pages. The problem I'm having when sa...
asked by 17.02.2017 / 04:01