Skip to main content
7 votes
1 answer
152 views

I want to atomically write files in Python. pathlib and tempfile should be used. I have import os from pathlib import Path import tempfile def atomic_write(f: Path, data: bytes) -> None: with ...
os_user's user avatar
  • 100
0 votes
1 answer
73 views

I am using tempfile with Polars for the first time and getting some surprising behavior when running it in a serverless Cloud Function-like environment. Here is my simple test code: try: with ...
starmandeluxe's user avatar
1 vote
1 answer
78 views

I have the following python code: import tempfile import os def test_paul_confused(): os.environ["TMP"] = "/home/fedora" assert tempfile.gettempdir() == "/home/fedora&...
Paul Dejean's user avatar
  • 3,796
0 votes
0 answers
39 views

I am trying to create a snippet of Python code that first writes a possibly large text file (think csv) to a SpooledTemporaryFile in memory. Then that spooled file is compressed with gzip. While some ...
РѕуVеtеrаn's user avatar
0 votes
1 answer
58 views

I am given a SpooledTemporaryFile through FastAPI's UploadFile. My goal is to write it to disk so I can extract it and process its contents later. This seems simple, but I am having problems saving ...
Elijah Crum's user avatar
0 votes
1 answer
108 views

If my multipart post is bigger than MultipartConfigElement.fileSizeThreshold, then my post is out of a temporary file. Undertow FileUtils read it so: public static String readFile(InputStream file, ...
László Tóth's user avatar
2 votes
1 answer
83 views

I'm creating an R package that automatically creates trained models. One of the goals is to allow the user to save the trained models for use with future data. The trained models were originally saved ...
Russ Conte's user avatar
0 votes
1 answer
75 views

I am using a Pytest fixture to clean up temporary files and directories created during tests. The fixture works for most test cases, but it fails to completely delete directories created in the first ...
ege selcuk's user avatar
2 votes
1 answer
78 views

I am using a bash script with some inline python to read a JSON API. I take a small part of the output and dump it into a temporary file. I know that the temporary file exists, because I am able to ...
Mayor of the Plattenbaus's user avatar
0 votes
0 answers
20 views

I want to download an MS Access file (.mdb) file available online and handle its content from within R. I'm, however, having an issue opening it as the result of a temporary download. I have used the ...
MerlinLutin's user avatar
5 votes
1 answer
121 views

With Ubuntu 24.10 switching to a tmpfs-based (i.e. in-memory) /tmp, having a /tmp that is not usefully larger than memory, or even one that is smaller than memory, is about to become a lot more common....
interfect's user avatar
  • 2,987
-1 votes
2 answers
515 views

I am trying to find a way to create Volatile/Temp tables in BQ as we can do in Teradata. I tried begin/end and it worked but cant access the temp table via select * just after running it as getting ...
Animesh Jain's user avatar
-3 votes
1 answer
89 views

I have code that is trying to create a directory in my temp folder. My code is : temp = os.path.join(tempfile.gettempdir(), "HDD") print(temp) And it prints: C:\Users\JEFFSA~1\AppData\Local\...
jeffinter's user avatar
1 vote
0 answers
215 views

I want to create a temporary folder on windows using tempfile.TemporaryDirectory, and use subprocess to execute an external program that will use that temporary directory. This does not seem to work ...
Caleb's user avatar
  • 4,167
0 votes
1 answer
87 views

I want to buffer some bioclimatic variables with the following code. I'm using R 4.4.1 on a windows 11 22H2 PC 64bit. # test buffersizes results <- lapply(buffersizes, function(buffer_distance) { ...
Karsten's user avatar

15 30 50 per page
1
2 3 4 5
128