File manager - Edit - /usr/local/CyberCP/lib/python3.10/site-packages/django/contrib/gis/geos/__pycache__/factory.cpython-310.pyc
Back
o �h� � @ s( d dl mZmZmZ dd� Zdd� ZdS )� )�GEOSGeometry� hex_regex� wkt_regexc C s� t | t�rt| d��} | �� }W d � n1 sw Y n| �� }t |t�rGz|�� }W n ty7 Y nw t�|�sBt �|�rFt |�S nt |�S t t|��S )zf Given a string file name, returns a GEOSGeometry. The file may contain WKB, WKT, or HEX. �rbN)� isinstance�str�open�read�bytes�decode�UnicodeDecodeErrorr �matchr r � memoryview)�file_h�buf�decoded� r �R/usr/local/CyberCP/lib/python3.10/site-packages/django/contrib/gis/geos/factory.py�fromfile s"