Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
0 answers
78 views

Since os is a module instead of a package, import os.path should fail. For comparison: >>> import os.sys Traceback (most recent call last): File "<python-input-0>", line 1, ...
0 votes
0 answers
93 views

I have a simple script to check if a USB device (UART) is plugged in. (OS = Ubuntu 22.04, Python 3.10). import os path = os.path.join('dev', 'ttyUSB0') print(f'DBG exists: {os.path.exists(path)}') ...
-3 votes
1 answer
125 views

I'm attempting to write a for loop that opens each image in a folder, processes it, and then outputs it back into the same folder. The problem is, when I run the script, nothing happens. I just see ...
1 vote
1 answer
91 views

In the following program, I have the three functions get_dataset1, get_dataset2, and get_dataset3 that are all very similar. They only differ in when they call len(dataset) and os.path.join = tmp. The ...
Imago's user avatar
  • 489
0 votes
2 answers
56 views

When extracting file paths, not all but a few results are returned that contain special characters ~$ at the start of the file name. I am looking to compare these file paths with another list, thus ...
0 votes
1 answer
91 views

I tried to read jpg pictures, but the path was always not found even though the path was correct. So I checked with os.path.exists. The image is called "ralf". And for os.path.exists("C:...
-2 votes
1 answer
82 views

How can I save a file with the name as: oldname+"_new"+extension in an elegant way? I currently do: ext = os.path.splitext(file)[1] output_file = (root+'/'+ os.path.splitext(file)[0]+"...
1 vote
2 answers
490 views

I am attempting to create a function that automatically runs through a folder and puts all of the files into a single .zip file and while I have it working, it is creating a nest of folders inside the ...
1 vote
2 answers
983 views

I have a project that i wrote with OOP on separated modules. First module that gets imported and called by an object is "DataLibrary". DataLibrary module's data source is an .xlsx file ...
R47's user avatar
  • 21
1 vote
2 answers
57 views

We need a code in pyhon that will create several text documents in which only information about the letter v will be written, and after the letter f create a text document with the next letter v, the ...
Mops Lops's user avatar
0 votes
0 answers
95 views

I've been working to create a script that compares CSV files (based on this post: https://medium.com/@satsundev/compare-two-csv-using-python-92a0a23d7f54) but have run into an issue where Python can't ...
0 votes
0 answers
29 views

I am trying to build a back-up script in order to back-up all my pc to an external ssd(lost all my data 3 times by now). It works great for the files and main folders but until now I am not able to ...
0 votes
2 answers
798 views

I have two paths. path1 = /users/fida/data_lake/data/archived/09142023 path2 = /users/fida/data_lake/data/localpublished/SPTTES/End_to_End_Edit_Schedule/2022-08-03_11_22_03.kp Output Im trying to get ...
Hayat's user avatar
  • 1,649
-1 votes
1 answer
1k views

Update: I am not getting the error when hosting this online. Able to delete normally. Leaving this up incase there are any useful answers for running locally on windows pc. Context: I download a pdf ...
0 votes
1 answer
114 views

Given: Files in a working directory: WKDIR = "/scratch/project_2004072/Nationalbiblioteket/dataframes" $ ls -l ...
farid's user avatar
  • 1,641

15 30 50 per page
1
2 3 4 5
...
34

AltStyle によって変換されたページ (->オリジナル) /