On this page
shutil.SpecialFileError
Prev: shutil.SameFileError | Up: shutil | Next: shutil.unpack_archive
Rel: shutil.chown, shutil.copy, shutil.copy2, shutil.copyfile
Ref: docs.python.org โ shutil.SpecialFileError
Tags: #public #python3 #stdlib #shutil
Import
import shutil
from shutil import SpecialFileError
Signature & Overview
shutil.SpecialFileError(...)
Raised when trying to do a kind of operation (e.g. copying) which is not supported on a special file (e.g. a named pipe)
Methods & Attributes
SpecialFileError.add_note(self, note, /)โ Add a note to the exceptionSpecialFileError.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import shutil
# Raised when trying to copy a named pipe (FIFO) or other non-regular special file
assert issubclass(shutil.SpecialFileError, OSError)
Gotchas
- Triggered on FIFOs / device nodes:
copyfile()refuses to copy special Unix files so it won't hang reading an endless pipe.
REPL Inspect
from shutil import SpecialFileError
help(SpecialFileError)
Linked from
Related notes
- tuts/python3/stdlib_module/shutil/SameFileError Linked here; links to this page; shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/unpack_archive Linked here; links to this page; shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/shutil/chown Linked here; shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/copy Linked here; shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/copy2 Linked here; shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/copyfile Linked here; shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/copyfileobj shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/copymode shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/copystat shared tags: #shutil, #stdlib