TransWikia.com

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!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP