Sandbox - os. functions remove, rename and others?
Hi all, I have more or less implemented a read/write filesystem in pypy sandbox. Right now I am extending it with os functions. For example os.rename and os.remove. I have followed the direction, that is extend sandlib.py and vfs.py files with the new functions a la def do_ll_os__ll_os_remove and def do_ll_os__ll_os_rename But I get an error when running a small test: import os os.remove( "aFil" ) Error: os.remove( "aFil" ) RuntimeError: internal error: <RuntimeError object at 0x872e798> [Subprocess exit code: 1] To verify that I understand the design correct, I added a new listdir function: do_ll_os__ll_os_listsdir(self, vpathname): It is a copy paste from the original: do_ll_os__ll_os_listdir(self, vpathname): This also gives an error, but it is different: for file in os.listsdir('.'): AttributeError: 'module' object has no attribute 'listsdir' I interpreted that, as I need, somewhere to define that I have implemented the remove function to the sandbox. The new listsdir is not defined in the os module, as expected. Regards Søren
participants (1)
-
Søren Laursen