Skip to main content
1 vote
2 answers
61 views

How to make my program that combines CSVs iterate over multiple subfolders in a directory?

So I'm trying to use Python to analyze images of cells taken in multiple wells of a 96 well plate. I was able to generate a csv of my data from said images from each field and group them by well. I ...
Alexander Morano's user avatar
0 votes
0 answers
34 views

os.path.join is acting weird when I try to use placeholder format. Can someone point out what I am doing wrong? [duplicate]

data_path = '/Users/acer/Downloads/t-less_v2/' info_path_mask = os.path.join(data_path, 'test_{}','{:02d}','info.yml') path_mask = os.path.join(data_path, 'test_{}','{}','info.yml') print(f"...
Civil Er's user avatar
0 votes
1 answer
59 views

My python code works fine but gives exception after pyinstaller

Traceback (most recent call last): File "Ish.py", line 1, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 378, in exec_module File "...
Eesh Gharat's user avatar
2 votes
0 answers
64 views

access denied OS module python

Right now I am working on a project a Files manager #delete file import os file_path = r"The\\path_file" try: os.remove(file_path) print("The file has been removed") ...
user avatar
0 votes
0 answers
63 views

How to create a terminal-like python pipe?

Some programs emit colored text when their output is connected to a terminal, and non colored text when their output goes to a pipe. Is there a way in Python to open a pipe to a subprocess such that ...
zapta's user avatar
  • 125
-1 votes
1 answer
30 views

Python Returns Different File Size than OS Property [duplicate]

I am trying to get the size of a a file called fGDB.gdb using python. but while the Windows Property shows the size of file as 146 KB (150,399 bytes) Using this code import os gdb = r"C:\Users\....
GISGUY's user avatar
  • 13
0 votes
0 answers
95 views

Python - PIL.save() issue - The fill character must be a unicode character, not bytes

I have some interesting issue with saving Image via PIL library. Aim: to change metadata like "Date Taken", "Creation Date" to pictures from picture name (name is standardize by ...
Jan Vaško's user avatar
0 votes
1 answer
100 views

File not printed using os.startfile?

i try to print a document on windows using the following code import os import sys os.startfile(r"D:/DEV/Python-Diverses/os/testb.png", "print") But nothing happens at all - ...
Rapid1898's user avatar
  • 1,249
1 vote
1 answer
65 views

Tkinter will not open when I try to import a variable from another Python Program

Tkinter will open a window with buttons, like I want, when I am not trying to import a variable from another Python program I wrote. But when I do, Tkinter will not open. When I use from my_program ...
Theodore Leon's user avatar
3 votes
2 answers
88 views

How to differentiate and split `os.environ` into defaults and addons

Is it possible to split os.environ into default environment variables and custom addon variables? For example, using syntax of sets representing the key/ENV_VAR_NAME: custom_addon_env_var_keys = set(...
Head Cracked's user avatar
-5 votes
1 answer
40 views

open path that exist doesnt work - python [closed]

The code gets the root path to the tests logs\log.jsonl which in the image is clearly there but cant open it #doesnt work dir_path = os.path.dirname(os.path.realpath(__file__)) with open(os.path.join(...
Navid Yaghmaei's user avatar
0 votes
2 answers
202 views

How to permanently add a path in the user's `PATH`?

I'm creating an installer for one of my projects, which downloads the binaries of the project (in a ZIP file) and then unzips it into a directory in the programs folder of the OS, and I want to add ...
foxypiratecove37350's user avatar
-2 votes
1 answer
63 views

How do I run a Python file on my Mac that reads and writes txt files to my external hardrive? [closed]

I currently have a folder full of epubs that I would like to read, a folder of epubs I've already read and would like to read again, and a corresponding file with the names of the epub files in each. ...
HarlequinTRT's user avatar
0 votes
0 answers
66 views

Accessing folder through os.scandir() after changes made to folder

I am trying to iterate through a folder with html files to filter them according to whether they contain a keyword or not in their string form. I download them to a folder through wget and ...
user24330119's user avatar
0 votes
1 answer
59 views

os.rename() fails with WinError 3: The system cannot find the path specified on Windows but works on Linux

I am using the following code to semi-automate renaming of media files def findingmedia(directory): media=[] for path,subdir, files in os.walk(directory): for file in files: ...
Mayank Gupta's user avatar

15 30 50 per page
1
2 3 4 5
38