Posts by Cleber Nandi • 137 points
23 posts
-
0
votes1
answer18
viewsA: Django - Standalone - How to validate value received from a Foreign key field?
I’ll put on record how I managed to resolve, in case anyone has this problem, or has a better solution. Finally I managed to solve it by doing this way: Since I couldn’t find a better way to read,…
-
0
votes1
answer18
viewsQ: Django - Standalone - How to validate value received from a Foreign key field?
I am working on a Django project whose purpose is to take advantage of models for both forms and frontend views and for a separate service. For this I found a way to transform/use Django models with…
-
0
votes1
answer24
viewsA: Difficulty to pass update column as parameter in Python3 function with Sqlalchemy
Resolved as follows: @classmethod def update(self, int_id, **kwargs): id = int_id for e in kwargs: coluna = e valor = kwargs[e] print('Nome ANTES da alteração:',…
-
-1
votes1
answer24
viewsQ: Difficulty to pass update column as parameter in Python3 function with Sqlalchemy
I’m using Sqlalchemy to work with database tables. I am creating classes for the proper tables, where I have as methods of these classes, Insert, filter_all(), etc. I’m using the following class…
-
0
votes1
answer51
viewsQ: Difficulty passing column in filter_by as parameter in Python3 function with Sqlalchemt
I’m using Sqlalchemy to work with database tables. I am creating classes for the proper tables, where I have as methods of these classes, Insert, filter_all(), etc. I’m using the following class…
-
3
votes1
answer702
viewsA: Python3 - How to get back folder?
I was able to solve using the "abspath" function as follows: return os.path.abspath(r"..\") That way it returned a directory as I wanted.
python-3.xanswered Cleber Nandi 137 -
2
votes1
answer702
viewsQ: Python3 - How to get back folder?
My file main py. is in the root directory of my project, example: "C:\Projetos\PyValidacao\main.py" With the module os I can take the real path of main py., but I need to make you create a folder…
python-3.xasked Cleber Nandi 137 -
1
votes1
answer1879
viewsQ: How to use Pyinstaller in Python 3?
I’m developing a system with the image structure below: How do I create an executable for "Transmorphus.py"? I have tried using Pyinstaller and never opens the system. I’ve searched several sites…
-
0
votes1
answer270
viewsQ: How to iterate with Python 3 dictionaries?
I have two files and need to generate a third from them. First file called "de_para". de_to.txt Inside this file I have the following sample content: Ordem Campo_para Campo_de 1 nome_emp RAZA 2…
-
0
votes1
answer1389
viewsQ: Problem to convert ANSI to UTF-8 in Python 3
I’ve got some files that have ANSI encoding and accents and "ç" and everything. I need to convert these various files to UTF-8 encoding. Some files get UTF-8 encoding and others don’t, why? The code…
-
0
votes0
answers34
viewsQ: Python - Doubt related to structure, I believe
Can someone explain to me what it is and in what situation applies the way to create methods below: def show_preprar_dados(self) -> object: pass I don’t know what it means and what it’s for when…
python-3.xasked Cleber Nandi 137 -
0
votes1
answer375
viewsA: (Python + Pyqt5) How to not let main application be closed without closing "daughters" windows open.?
I managed to solve the problem by following the idea on the way: https://stackoverflow.com/questions/36768033/pyqt-how-to-open-new-window. So I adapted my application and was exactly as I want, IE,…
pythonanswered Cleber Nandi 137 -
1
votes1
answer375
viewsQ: (Python + Pyqt5) How to not let main application be closed without closing "daughters" windows open.?
I have my main application with menus (Menubar) where calls the function that creates and opens another window "daughter". My problem is in the part where I can close my main application without…
pythonasked Cleber Nandi 137 -
-1
votes1
answer203
viewsQ: How to create a Progressbar with Python and Pyqt5?
I’m having a little trouble creating a Progress bar, it’s actually about interacting with her because creating in yourself is actually easy: self.progressbar = QProgressBar()…
-
0
votes1
answer318
viewsA: create an MDI screen with Python and Pyqt5
I was able to solve the problem mentioned above. I’ll post here how I managed to do what I wanted. All part is done in the imported view module below: from view.view_main import MainWindow "main"…
-
0
votes1
answer318
viewsQ: create an MDI screen with Python and Pyqt5
I’m making a system with Python and Pyqt5. I already created the menus and now I’m applying the necessary functions of each item. I want to work with MDI screens and I’m having difficulties with it.…
-
1
votes1
answer159
viewsQ: Python - Pyqt5 - how to insert a Qgridlayout into a Qmainwindow?
Good afternoon, everyone. I got a problem. I’m using Qmainwindow to create a screen where I insert a Qmenubar successfully, but then I’ll try to insert a Qgridlayout and it doesn’t work. No error…
pythonasked Cleber Nandi 137 -
0
votes4
answers2357
viewsA: Python - Higher value of a dictionary per key
That’s the way I found to solve my problem: for row in read_file: codi = dict(row).get("CODI") codigo_empresa = codi[:3] codigo_empregado = codi[4:8] if codigo_empresa not in dict_empregado_maior:…
python-3.xanswered Cleber Nandi 137 -
0
votes1
answer431
viewsQ: Python - Kivy - pyInstaller - Generate executables
Good morning, everyone. I’m on a kivy project where I’m working with, or at least trying to work on MVC mode. So I have view, model, controller folders. In view folder I have the ". Kv" kivy files.…
-
3
votes1
answer427
viewsQ: Python - Run the next command without waiting for the end of the first
Good evening, everyone. I have the following function to create a bar Progress: def progress_bar(p_value, p_max: int): """ :70 = É o tamanho da barra :param p_value: Valor que está sendo iterado de…
pythonasked Cleber Nandi 137 -
0
votes2
answers183
viewsA: Python - Pass parameter instead of modules in FROM declaration
I managed to resolve the issue above the mode below: import_module = str("source." + concurrent + "." + concurrent) import_class = concurrent.capitalize() from_estructure = __import__(import_module,…
pythonanswered Cleber Nandi 137 -
-2
votes2
answers183
viewsQ: Python - Pass parameter instead of modules in FROM declaration
Good afternoon, everyone. I am in a dilemma when making the FROM statement. import to import the modules, as follows below: For this utility, I do not want and cannot pass the FROM.. import…
pythonasked Cleber Nandi 137 -
0
votes4
answers2357
viewsQ: Python - Higher value of a dictionary per key
Good morning to all. I need a lot of help with a project I’m doing. I’m having trouble getting only the highest values from a dictionary or a list. I’ll try to explain it better: In AWK language I…
python-3.xasked Cleber Nandi 137