GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — os.remove() does not remove files in a sub-directory · Issue #95758 · python/cpython Closed Labels type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportUsing os.remove() to remove multiple files in a subdirectory using an absolute path does not work in multiple linux environments, including z/OS Unix, Ubuntu Linux 20.04 under Windows WSL, and Ubuntu Linux 20.04 in VIrtualBox under Windows. In each environment, the attempt was made to accomplish a multiple-file remove from a directory as follows: os.remove("/abs/path/to/currdir/contest/*") Where "/abs/path/to/currdir" is returned from os.getcwd() and path separators are added via os.sep. Also tested was using subprocess.run to execute an "rm" command (with no flags) to remove the same files followed by an "rmdir" command to remove the directory, and both of those also fail to remove the files as requested and therefore the directory since it is not empty. In all cases, performing the equivalent "rm" and "rmdir" commands from a shell prompt or from a shell script directly (rather than from inside a python program) succeed as expected. Shell script and python script demonstrating the issue are attached, along with logs of output from the three environments tested. My environments
uname and python version outputs follow. z/OS Unix: WSL Ubuntu: VirtualBox Ubuntu: Attaching shell and python scripts here as *.txt files, rename to execute: Logs from each tested environment: z/OS Unix: WSL Ubuntu: VirtualBox Ubuntu: Please also CC me at pjfarley3 at earthlink dot net for any questions or updates. Activity
MetadataMetadataAssigneesLabelstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |