Posts by Tiago TF Dias • 45 points
10 posts
-
0
votes0
answers13
viewsQ: Python - Path definition ST.PROJECT_ROOT = os.environ['PROJECT_ROOOT']
I’m trying to spin a test project, but it always makes that mistake: ImportError while loading conftest…
pythonasked Tiago TF Dias 45 -
3
votes1
answer517
viewsQ: Calculation of age in Java
I have a code that should calculate the age, but in my test I can’t catch the day nor the month of Data and yet age comes wrong due to this. On the test returns 32 years, while it should be 31.…
-
0
votes2
answers52
viewsA: Switcher in python with Get
Got it bro, got it like this: def validate_case_name(context, case): switcher = { "THE TEACHER": 0, "THE ARTIST": 1, "THE DRIVER": 2 } name =…
-
-1
votes2
answers52
viewsQ: Switcher in python with Get
I created a function in Python to return me a name of an object. Before trying to use Switcher I did several variables as below: name_case_1 =…
-
0
votes1
answer75
viewsQ: How to read json in html
I don’t know if that would be the right question, but I have an html code and I’m trying to fill in the json I have, but I have no idea how to do it, what I googled didn’t work. my html is this…
-
0
votes1
answer382
viewsQ: Remove empty list in Python
os.chdir(pasta) lista = [] for air in os.walk('.'): if lista != []: lista.append(air) print(lista) Could someone tell me why I can’t print the folders? If I take the if, folders appears, but also…
-
0
votes5
answers842
viewsA: Find a file type within several folders and save the hierarchy
That’s how the Sadie got pasta : { "Numero Json+": 1, "Version": "Sprint 3", "list": [ "Sprint 3", 1, [ "Setup\\tc001.air", "Settings\\tc001.air", "Game_play\\tc001.air", "Menu\\tc001.air" ] ] }…
pythonanswered Tiago TF Dias 45 -
0
votes5
answers842
viewsA: Find a file type within several folders and save the hierarchy
import os import os.path import glob from pathlib import Path import json import shutil import pathlib pasta = 'D:/tfdia/OneDrive/Automação/Projects/Games/Virgo' version = '3' number = 1…
pythonanswered Tiago TF Dias 45 -
0
votes5
answers842
viewsA: Find a file type within several folders and save the hierarchy
Hello, I was surprised by the answers of each one, I thought that no one would answer, each one contributed a lot to my learning in python. I thank the jsbueno that top explanation
pythonanswered Tiago TF Dias 45 -
0
votes5
answers842
viewsQ: Find a file type within several folders and save the hierarchy
I have the following situation, I have a folder that contains several projects, within each project has an automation folder, and within folder automation several folders type: Game_play, Menu,…
pythonasked Tiago TF Dias 45