Questions tagged as 'python'

2
answers

Problem with calculator in Python 3.7

I have a question I'm doing an exercise of a calculator in Python 3.7. I have the logic created and the calculator works correctly but I have the following doubt: How do I ask the user if he wants to perform another operation and in the case of...
asked by 08.12.2018 / 07:20
1
answer

Receive and order GPS data in Raspberry

I am trying to receive some data from a NEO M6 GPS module in my Raspberry Pi 3 and I have already verified that there is communication between them. I have this script in python but it does not work for me. I do not understand python. import g...
asked by 27.05.2017 / 13:36
1
answer

like parsing an XML document to print it in console

Good afternoon, I need help to parse a document .XML in Python, I just need to know the best way to printearlo in the console (bash or cmd). the question is that I have already managed to parse the document, but in it there are elements that are...
asked by 30.05.2017 / 20:28
2
answers

Help python loop

I am starting in the programming with Python and I have come across a problem .... I want to make an infinite loop which comes out if I press the "s" option or if the raspberry button is activated. This is what I programmed, but it does not work...
asked by 05.07.2017 / 19:28
2
answers

Rename a file with Python

I'm trying to change the name of a file using Python but the name does not change. The program has to take a photo, save it, copy it to a server, change the name of the copied photo and change the name of the original photo. So, first, I define...
asked by 08.05.2017 / 16:54
2
answers

extract name of a pdf with python

Good afternoon, I hope you can help me. I have a pdf that has the name "nombre_apellidop_apellidom_edad.pdf" What I need is to extract the name of the pdf and divide it in order to use the data separately, an example would be this: Jose...
asked by 09.05.2017 / 23:03
1
answer

help in a list comprehension python with double for

I have these dictionaries defined SustantivoMS = {#diccionario sustantivo masculino singular 'perro':'PERRO', 'gato':'GATO', 'arbol':'ARBOL' } ArticuloMS = {#diccionario para articulos masculinos singular 'el':'EL', 'un'...
asked by 10.05.2017 / 16:51
2
answers

Execute the for by changing a piece of string

Good friends, Greetings. The fact is that I am starting in the prog. And testing I found something curious. First look at the code and then the doubt. Thanks in advance def body(): print(temps) if __name__ == '__main__': temps=list...
asked by 17.05.2017 / 04:41
1
answer

Use subprocess to use complex ffmpeg commands with pyQt

Using pyQt I want to run ffmpeg. With simple orders, there is no problem. For example: def b3_clicked(): subprocess.call(['ffmpeg', '-i', fileinput, fileoutput + '.mov']) This works well. The problem is when I want to use something comp...
asked by 11.05.2017 / 20:57
1
answer

Check if several values are in a python list

I have a list of integers called MsgID and I want to do an If where it checks if within that list there is any value greater than 3. My attempt: if [3,2,1,0] not in MsgID: pass I've also tried with if MsgID > 3: pass  ...
asked by 05.05.2017 / 10:15