astropy 5.0

_handle_bom(self, infile)

If an encoding is specified, that must be used - but the BOM should still be removed (and the BOM attribute set).

(If the encoding is wrongly specified, then a BOM for an alternative encoding won't be discovered or removed.)

If an encoding is not specified, UTF8 or UTF16 BOM will be detected and removed. The BOM attribute will be set. UTF16 will be decoded to unicode.

NOTE: This method must not be called with an empty infile .

Specifying the wrong encoding is likely to cause a UnicodeDecodeError .

infile must always be returned as a list of lines, but may be passed in as a single string.

Handle any BOM, and decode if necessary.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /astropy/extern/configobj/configobj.py#1369
type: <class 'function'>
Commit: