I created a function to delete files:
def deleteFile(deleteFile): if os.path.isfile(deleteFile): os.remove(deleteFile)
However, when transferring the FIFO file name (without the file extension), this is not accepted by the os module. In particular, I have a subprocess that creates a FIFO file called "Testpipe". When called:
os.path.isfile('Testpipe')
This is the result of False . The file is not used / open or something like that. Python runs on Linux.
How can you delete such a file correctly?
source share