Questions tagged [pyfilesystem]

Questions related to the PyFilesystem python library, which is a standardized file system on top of many other types of filesystem (OS, Temp, AWS S3, etc.).

18 questions
2
votes
0 answers

pyfilesystem2 InvalidCharsInPath error when path contains square brackets [ & ]

I'm using pyfilesystem2 to scan for files in my network and deleting those that shouldn't be there. The problem comes when the file I'm trying to delete contains square brackets [ & ], ex: 'Operation Red Sea (Hong hai xing dong) (2018)…
2
votes
1 answer

How to mount a memory filesystem onto a directory

I have a memory filesystem in Python, created in the following fashion: import fs mem_fs = fs.open_fs('mem://') mem_fs.makedirs('/dir1') with mem_fs.open('/dir1/file1', 'w') as file1: file1.write('test') I want to mount this filesystem onto a…
Proto Ukr
  • 492
  • 4
  • 13
1
vote
0 answers

Cross-Process Memory Filesystem In Python

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…
Eliran Abdoo
  • 611
  • 6
  • 17
1
vote
2 answers

Can pyfilesystem combine schemas?

I would like to use pyfilesystem with a combination of schemas. For example, I want to open a tar file on an FTP server and I would do ftp+tar://user:password@host:port/path/file.tar.gz.
Anton Daneyko
  • 6,528
  • 5
  • 31
  • 59
1
vote
1 answer

Is there a way to work with named pipes in PyFileSystem?

Is there a way to create and work with named pipes in PyFileSystem? I don't see a reference to fifo or pipe in the docs.
David Parks
  • 30,789
  • 47
  • 185
  • 328
1
vote
1 answer

Can PyFilesystem be forced to make filesystems a singleton?

I'm using PyFilesystem. The code I am testing creates a default filesystem using open_fs(file_url). When I test this code I can now pass in mem://filepath/filename to run the test using a memory filesystem. However for testing I need to populate…
David Parks
  • 30,789
  • 47
  • 185
  • 328
0
votes
0 answers

Load the TensorFlow model from in-memory filesystems (PyfileSystem 2)

I am currently working on reloading the model from the in-memory folder (created by Pyfilesystem 2). I encrypted my model firstly and then decrypted the model to a in-memory temp folder using fs.MemoryFS(). I printed the structure of the temp folder…
mjxb
  • 43
  • 4
0
votes
0 answers

Allowing access to a PyFilesystem fs over a network, e.g. via FTP

I am attempting to build an application that will allow multiple users to maintain personal, sandboxed file systems on a server, but access them via a client application. I've determined that I can use PyFilesystem to store these file systems as…
drMathwin
  • 33
  • 6
0
votes
1 answer

Does fsspec support virtual filesystems such as pyfileysystem

One of pyfilesystem's main feature is virtual filesystems. E.g. home_fs = open_fs('~/') projects_fs = home_fs.opendir('/projects') I think that is a great feature and was hoping that fsspec has something similar. But I couldn't find an example and…
Juergen
  • 699
  • 7
  • 20
0
votes
0 answers

How to use PyFileSystem to redirect output of other program

I am using python in Windows. You know there is no tmpfs filesystem like Linux in Windows. So, I want to use pyfilesystem instead. The original codes are like below: >>> import SomeLibs1 >>> import SomeLibs2 >>> SomeLibs1.Convert('input.txt',…
Alan Guo
  • 13
  • 4
0
votes
0 answers

Execute bytes string in Python from an .exe file

Given a binary file, such as "Installer.exe", how can I read in the bytes of that file and then execute those bytes? i.e. with open('Installer.exe', 'rb') as file: data = file.read() some_function_to_execute_bytes(data) I am aware that it is…
Chris Collett
  • 1,074
  • 10
  • 15
0
votes
1 answer

lca calculation with brightway '2.5'

I am trying to calculate montecarlo results with the development version of brightway. From a newly created environment I first tried with the versions I had installed (bw2calc 2.0.dev ; bw2data 4.0.dev ; fs 2.4.11). (installing fs using the…
Nabla
  • 1,509
  • 3
  • 20
  • 35
0
votes
0 answers

Is it safe to not close pyfilesystem FS objects for read-only operations on in-memory archives?

I see this note in the docs of TarFS of pyfilesystem Close the filesystem and release any resources. It is important to call this method when you have finished working with the filesystem. Some filesystems may not finalize changes until they are…
Anton Daneyko
  • 6,528
  • 5
  • 31
  • 59
0
votes
1 answer

Opening a file in pyfilesystem's s3 filesystem fails

I'm trying to simply open a file in pyfilesystem's s3 filesystem as such: >>> s3fs.listdir('dfparks/test') ['test.txt'] >>> s3fs.open('dfparks/test/test.txt') I get the error: fs.errors.ResourceNotFound: resource 'dfparks/test/test.txt' not…
David Parks
  • 30,789
  • 47
  • 185
  • 328
0
votes
1 answer

Does PyFilesystem's s3 filesystem support python 3?

The documentation for PyFilesystem's s3fs (S3 filesystem) says that it is only supported in python 2 because boto only supports python 2. https://pyfilesystem.readthedocs.io/en/latest/s3fs.html However Boto3 is released and…
David Parks
  • 30,789
  • 47
  • 185
  • 328
1
2