Questions tagged as 'python-3.x'

0
answers

problem with cycle

friends I need to separate the first digit for a number read but I have not been able to do what I've done always separates me the last: try: numero=int(input("Digite un numero entero:")) suma=0 for i in str(numero): suma...
asked by 28.08.2018 / 04:22
0
answers

QSpinBox range assignment

I have to define a QSPINBOX in pyqt, where the values taken by the QSPINBOX each time the ValueChanged () signal returns is that of a defined vector. For example: vector = [10, 15, 3, 20] In other words, the QSPINBOX in this case...
asked by 28.08.2018 / 16:18
0
answers

connect to oracle database with phyton

I'm trying to connect to an oracle database via 32-bit phyton 3.6.5, but I miss this error: I ping the database and receive a correct answer. I can also connect to the developer correctly. I have also done a tnsping and returns: performed...
asked by 27.08.2018 / 10:15
0
answers

How can I return a .json file in python with flask

I have a method to read the .json I have in a folder inside the api in flask The method in question I pass a directiorio (dir) and I go through it with a for as it is a folder more folders inside and within these latest folders the .json -esta...
asked by 23.08.2018 / 17:26
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

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

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