Cross-Process Memory Filesystem In Python

Stack Overflow Asked by Eliran Abdoo on December 6, 2020

I have a main Python program that invokes (via Popen) another program in C++. The two programs transfer files to one another, and these files are rather huge.

I want to be able to keep those files in RAM instead of writing them to disk from one program, and then reading it in the other program.

The point is that I can’t really touch the code of the C++ program, only the Python one, and all I can do is to inject the C++ program with filesystem paths, so I need an abstraction of filesystem over RAM.

I’ve seen the option of using PyFileSystem, but I’m not sure whether it is possible to use the MemoryFS paths in an external program, just as if it was a regular mount point. Seems as if it is only usable via the API of the FS object itself. (Be glad to know whether I’m wrong here)

Add your own answers!

Related Questions

Appending a list in a list using a for loop

2  Asked on November 22, 2021 by syed-ahmed


Regular expression to find Specific character in a string

4  Asked on November 22, 2021 by user3061338


laravel count records based on each single date

1  Asked on November 22, 2021 by gulzar-ali


Change one property in CSS

2  Asked on November 22, 2021 by darek


Splitting values in a list and making variables of them

1  Asked on November 22, 2021 by premier12


JSX fragment has no corresponding closing tag

1  Asked on November 22, 2021 by chinwe-watkins


How to slow down window.location.href on AJAX request

3  Asked on November 22, 2021 by agiftel-longwave


Why list initialization disallow narrowing?

0  Asked on November 22, 2021 by alan-jian


How can i remove object from nested array?

2  Asked on November 22, 2021 by trajce12


How to save model architecture in PyTorch?

3  Asked on November 22, 2021


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir