path

how does jenkins recognize paths inside a python script?

how does jenkins recognize paths inside a python script? Question: I have a python script that points to some file names and log files and I have jenkins to run the script, when run locally from my system the code works fine. The way I access my folders in python: folder_artifacts_data = ‘C:/Users/Rhea/OneDrive -Area/Rhea/Metrics_Configuration/Artifacts/’ path_to_log_file …

Total answers: 1

How to open files when subdirs name and file names match

How to open files when subdirs name and file names match Question: I have file structure like this dir1 subdir1 -file1.txt -file2.txt subdir3 -file2.txt dir2 subdir1 -file1.txt subdir2 -file2.txt I want to use dir1 as reference directory and open file in dir2 when dir2 subdirs names match to that one in dir1. So basically open …

Total answers: 2

Selecting multiple files according to timestamp with glob

Selecting multiple files according to timestamp with glob Question: I have a directory with 7000 daily .tif files, spanning from 2002 to 2022. Each file has a respective indication of its timestamp, in the yyyy/mm/dd format, as: My_file_20020513.tif I’m trying to select the file paths according to their respective month, i.e. all files from January, …

Total answers: 1

How do I click a button with selenium

How do I click a button with selenium Question: Hello Guys i’m tryng to click a button but is not working. my code is like this: from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By driver = webdriver.Chrome() driver.implicitly_wait(0.5) driver.maximize_window() driver.get("https://www.freewayinsurance.com/") driver.implicitly_wait(0.5) element = driver.find_element(By.ID, "zipcode") element.send_keys("60056") element2 = driver.find_element(By.XPATH,"//div[@class=’c-hero-home-radio__form-items’]//button[@Class=’c-button c-button–orange’ and …

Total answers: 2

How do I install a script to path on Mac OS on VScode

How do I install a script to path on Mac OS on VScode Question: Every time I install something using pip I get this warning message and the package I installed doesn’t work. I don’t understand what path is or how to fix it. I keep seeing solutions saying to simply change the files to …

Total answers: 3

Saving files to different folder

Saving files to different folder Question: I´m trying to save converted excel files from different paths, to the same folder. How can I pass the path to the function correctly? Now what is happening is that it is attaching the original path to the save path I have given to the function. So my solution …

Total answers: 1

Convert files from diferent paths using python

Convert files from different paths using Python Question: I´m trying to convert Excel files from different paths but it only converts the file in the last path in path list. What is the proper way to loop trough the paths in the list to to get the files to be converted? import pandas as pd …

Total answers: 1

Selenium how to save screenshot to specific directory in Python

Selenium how to save screenshot to specific directory in Python Question: I would like to take a screenshot for my selenium driver and save it to a specific directory. Right now, I can run: driver.save_screenshot(‘1.png’) and it saves the screenshot within the same directory as my python script. However, I would like to save it …

Total answers: 2

How to reference another file (i.e. png or jpg) in another directory in Python3?

How to reference another file (i.e. png or jpg) in another directory in Python3? Question: I’m using VS Code to program in Python. Instead of copying and pasting an image (or any other type of file) from one directory to the same directory my .py file is located in, I want to reference that image …

Total answers: 1