Questions tagged as 'python'

1
answer

Help with python functions

I made a code that uses some functions. Such functions give a value to n and as they are called, the value of n changes (these functions are at the beginning of the code). What happens is that when you execute the script, so do not call the func...
asked by 06.11.2018 / 04:37
2
answers

Execute bash script, from python, with script in the PATH

I have a folder with multiple scripts that I want to call from Python. I have added the folder to the PATH to be able to call these from any directory. And it has been added correctly: user@myuser:~ export PATH=$PATH:~/misScripts user@myus...
asked by 23.08.2018 / 13:54
1
answer

Can parameters be passed to a function its own return value?

Hi, I'm trying to do a filter but I need the filter output data to go through the N times filter again, until I get the data I'm looking for. But can this be done in python? I need to do it with the use of calls to a filter function determined b...
asked by 07.07.2018 / 01:59
1
answer

Access data in a tuple

I have the following code: import firebase_admin from firebase_admin import credentials from firebase_admin import db cred = credentials.Certificate("2.json") firebase_admin.initialize_app(cred,{ 'databaseURL':'https://new1-3b819.firebase...
asked by 12.07.2018 / 18:46
1
answer

QFrame without mosaic and centered

I have the following code: from PyQt5 import QtCore, QtWidgets, uic from functools import partial class MainWindow(QtWidgets.QMainWindow): def __init__(self, parent=None): super(MainWindow, self).__init__(parent) uic.loa...
asked by 12.07.2018 / 19:32
1
answer

Consult MongoDB from Python

I'm trying to make a query to MongoDB from Python, I'm just getting into these technologies. I have this code import pymongo from pymongo import MongoClient client = MongoClient() db = client.crawler.users res = db.find() print( res )...
asked by 07.07.2018 / 00:17
1
answer

Delete a selected row in a QTableWidget

I have the following problem: I try to delete a selected row of a TableWidget but it does not work. This is the function I occupy: self.check.clicked.connect(lambda:self.tabla.selectedItems().clear()) And this is the complete code:...
asked by 17.07.2018 / 21:32
1
answer

key.pressEvent (), does not execute the indicated task

I would like to know how I can execute a function by pressing the enter key, in a specific widget. For this case, I am trying to execute a function at the moment of pressing enter in the qlineedit. but it does not answer this is the image of...
asked by 27.07.2018 / 05:59
2
answers

transform dates in words to numeric dates

I have to turn dates into words into dates into numbers 21-MARZO-2017 09-FEBRERO-2017 16-MAYO-2017 Which should look like this 21-03-2017 09-02-2017 16-05-2017 I tried to make an fix with the months and then compare them and replace...
asked by 15.02.2017 / 16:01
2
answers

Know my private ip from python

I am creating a small chat that will work in a local network, I explain the situation: where I study there are 3 rooms with computers and pages like facebook, twitter and other social networks are blocked, so I thought it would be a good idea to...
asked by 27.07.2018 / 09:12