Questions tagged as 'python'

1
answer

How to adjust the width of a table header and sort the rows

I have the following code to build a result table in Pyqt: def Tabla(self): #Boton de exportar a excel self.toolButton = QtWidgets.QToolButton() #self.toolButton.setGeometry(QtCore.QRect(30, 190, 41, 31)) icon1 = QtGui.QIco...
asked by 20.08.2018 / 09:39
0
answers

Define several vBoxLayout within the same window

I have defined a vBoxLayout so that the upper elements of the window remain in the upper zone. Now, I have created a new vBoxLayout (without success) so that the table occupies the entire height of the window and there is no space left:...
asked by 21.08.2018 / 14:49
0
answers

Open a temporary excel in python

I have been looking for how to open an excel but I have only found how to open an excel already created: os.system('start excel.exe "%s\file.xls"' % (sys.path[0], )) What I'm doing is a "Do you want to open or save the excel?" window, but f...
asked by 23.08.2018 / 14:41
0
answers

Treview Column with buttons or links

Good I have a treeview with several columns and I would like to add another one with buttons. I've been looking at the treeview widget that does not allow you to insert buttons as such, as you could create a column whose cells act as buttons, th...
asked by 22.08.2018 / 16:59
0
answers

Error in if with command output

I am doing a script with python to know when someone is connected to my system using ssh in linux mint, I have this: #! /usr/bin/python3 import subprocess subprocess.run("who > /home/sergio/Comandos/who.txt",shell=True) a=subprocess.check_...
asked by 22.08.2018 / 17:02
0
answers

Help with Django Form

I currently have this form to enter patients: class PacienteForm(forms.ModelForm): class Meta: model = Pacientes fields = '__all__' validar= forms.BooleanField(required=False) widgets = { 'nombres': forms.TextInput(at...
asked by 22.08.2018 / 19:07
0
answers

how to make angular "receive" or pull an html file, and from angular to python?

In a form of an HTML page with the tag input typye="file", in which you can select a file, this file is sent by email in automatic .. in my project I pull the data to angular and later by means of post I send it to python to send mail from py...
asked by 29.08.2018 / 21:28
0
answers

tf.GradientTape () returns None

I am trying to calculate the gradient with tf.GradientTape. When I try to do it using as inputs the loss and Model.variables the result that returns me in an array of None. what am I doing wrong? The tensorflow version I use is 1.9. Then I le...
asked by 23.08.2018 / 23:35
0
answers

Abstract value of a select and I am working with beatifulsoup in python

I have the following html structure and I want to extract the value of the third option of the select with beatiful soup <div class="box"> <form id="busquedaFiltros" style="margin: 0;" class="form-horizontal" action="busqueda...
asked by 23.08.2018 / 22:06
0
answers

Click randomly on an image from sikuli

I would like to randomly click on the captured example example: I capture a box and click on each% random% of that box. I tried to do it on my own save a random number in a variable, create an if and if it came out for example the number 1 ex...
asked by 31.08.2018 / 02:12