dcase_util.files.Package
- class dcase_util.files.Package(*args, **kwargs)[source]
Generic package class
Methods
__init__
(*args, **kwargs)compress
([filename, path, file_list, size_limit])Compress the package.
delimiter
([exclude_delimiters])Use csv.sniffer to guess delimiter for CSV file
detect_file_format
([filename])Detect file format from extension
empty
()Check if file is empty
exists
()Checks that file exists
extract
([target_path, overwrite, ...])Extract the package.
get_file_information
()Get file information, filename
get_info
()Get package info
is_package
([filename])Determine if the file is compressed package.
load
([filename])Load file
log
([level])Log container content
save
([filename])Save file
show
([mode, indent, visualize])Print container content
to_html
([indent])Get container information in a HTML formatted string
to_string
([ui, indent])Get container information in a string
Validate file format
Attributes
bytes
File size in bytes
logger
Logger instance
md5
Checksum for file.
package_password
Package password
valid_formats
Valid file formats