xref: /dflybsd-src/contrib/file/magic/Magdir/python (revision 739f0ef867128a933e021db3d831e906fcafd825)
1327e51cbSPeter Avalos
2327e51cbSPeter Avalos#------------------------------------------------------------------------------
3*3b9cdfa3SAntonio Huete Jimenez# $File: python,v 1.45 2022/07/24 23:59:37 christos Exp $
4327e51cbSPeter Avalos# python:  file(1) magic for python
5327e51cbSPeter Avalos#
69f86ab30SPeter Avalos# Outlook puts """ too for urgent messages
7327e51cbSPeter Avalos# From: David Necas <yeti@physics.muni.cz>
8327e51cbSPeter Avalos# often the module starts with a multiline string
99f86ab30SPeter Avalos0	string/t	"""	Python script text executable
106fca56fbSSascha Wildner# MAGIC as specified in Python/import.c (1.0 to 3.7)
11*3b9cdfa3SAntonio Huete Jimenez# and in Lib/importlib/_bootstrap_external.py (3.5+)
12c30bd091SSascha Wildner# two bytes of magic followed by "\r\n" in little endian order
136fca56fbSSascha Wildner0	belong		0x02099900	python 1.0 byte-compiled
14614728caSSascha Wildner!:mime application/x-bytecode.python
156fca56fbSSascha Wildner0	belong		0x03099900	python 1.1/1.2 byte-compiled
16614728caSSascha Wildner!:mime application/x-bytecode.python
176fca56fbSSascha Wildner0	belong		0x892e0d0a	python 1.3 byte-compiled
18614728caSSascha Wildner!:mime application/x-bytecode.python
196fca56fbSSascha Wildner0	belong		0x04170d0a	python 1.4 byte-compiled
20614728caSSascha Wildner!:mime application/x-bytecode.python
216fca56fbSSascha Wildner0	belong		0x994e0d0a	python 1.5 byte-compiled
22614728caSSascha Wildner!:mime application/x-bytecode.python
236fca56fbSSascha Wildner0	belong		0xfcc40d0a	python 1.6 byte-compiled
24614728caSSascha Wildner!:mime application/x-bytecode.python
256fca56fbSSascha Wildner0	belong		0xfdc40d0a	python 1.6 byte-compiled
26614728caSSascha Wildner!:mime application/x-bytecode.python
27327e51cbSPeter Avalos0	belong		0x87c60d0a	python 2.0 byte-compiled
28614728caSSascha Wildner!:mime application/x-bytecode.python
296fca56fbSSascha Wildner0	belong		0x88c60d0a	python 2.0 byte-compiled
30614728caSSascha Wildner!:mime application/x-bytecode.python
31327e51cbSPeter Avalos0	belong		0x2aeb0d0a	python 2.1 byte-compiled
32614728caSSascha Wildner!:mime application/x-bytecode.python
336fca56fbSSascha Wildner0	belong		0x2beb0d0a	python 2.1 byte-compiled
34614728caSSascha Wildner!:mime application/x-bytecode.python
35327e51cbSPeter Avalos0	belong		0x2ded0d0a	python 2.2 byte-compiled
36614728caSSascha Wildner!:mime application/x-bytecode.python
376fca56fbSSascha Wildner0	belong		0x2eed0d0a	python 2.2 byte-compiled
38614728caSSascha Wildner!:mime application/x-bytecode.python
39327e51cbSPeter Avalos0	belong		0x3bf20d0a	python 2.3 byte-compiled
40614728caSSascha Wildner!:mime application/x-bytecode.python
416fca56fbSSascha Wildner0	belong		0x3cf20d0a	python 2.3 byte-compiled
42614728caSSascha Wildner!:mime application/x-bytecode.python
43c990e5baSDaniel Fojt0	belong		0x45f20d0a	python 2.3 byte-compiled
44614728caSSascha Wildner!:mime application/x-bytecode.python
45c990e5baSDaniel Fojt0	belong		0x59f20d0a	python 2.4 byte-compiled
46614728caSSascha Wildner!:mime application/x-bytecode.python
47c990e5baSDaniel Fojt0	belong		0x63f20d0a	python 2.4 byte-compiled
48614728caSSascha Wildner!:mime application/x-bytecode.python
49327e51cbSPeter Avalos0	belong		0x6df20d0a	python 2.4 byte-compiled
50614728caSSascha Wildner!:mime application/x-bytecode.python
516fca56fbSSascha Wildner0	belong		0x6ef20d0a	python 2.4 byte-compiled
52614728caSSascha Wildner!:mime application/x-bytecode.python
53c990e5baSDaniel Fojt0	belong		0x77f20d0a	python 2.5 byte-compiled
54614728caSSascha Wildner!:mime application/x-bytecode.python
55c990e5baSDaniel Fojt0	belong		0x81f20d0a	python 2.5 byte-compiled
56614728caSSascha Wildner!:mime application/x-bytecode.python
57c990e5baSDaniel Fojt0	belong		0x8bf20d0a	python 2.5 byte-compiled
58614728caSSascha Wildner!:mime application/x-bytecode.python
59c990e5baSDaniel Fojt0	belong		0x8cf20d0a	python 2.5 byte-compiled
60614728caSSascha Wildner!:mime application/x-bytecode.python
61c990e5baSDaniel Fojt0	belong		0x95f20d0a	python 2.5 byte-compiled
62614728caSSascha Wildner!:mime application/x-bytecode.python
63c990e5baSDaniel Fojt0	belong		0x9ff20d0a	python 2.5 byte-compiled
64614728caSSascha Wildner!:mime application/x-bytecode.python
65c990e5baSDaniel Fojt0	belong		0xa9f20d0a	python 2.5 byte-compiled
66614728caSSascha Wildner!:mime application/x-bytecode.python
67327e51cbSPeter Avalos0	belong		0xb3f20d0a	python 2.5 byte-compiled
68614728caSSascha Wildner!:mime application/x-bytecode.python
696fca56fbSSascha Wildner0	belong		0xb4f20d0a	python 2.5 byte-compiled
70614728caSSascha Wildner!:mime application/x-bytecode.python
71c990e5baSDaniel Fojt0	belong		0xc7f20d0a	python 2.6 byte-compiled
72614728caSSascha Wildner!:mime application/x-bytecode.python
7379343712SPeter Avalos0	belong		0xd1f20d0a	python 2.6 byte-compiled
74614728caSSascha Wildner!:mime application/x-bytecode.python
756fca56fbSSascha Wildner0	belong		0xd2f20d0a	python 2.6 byte-compiled
76614728caSSascha Wildner!:mime application/x-bytecode.python
77c990e5baSDaniel Fojt0	belong		0xdbf20d0a	python 2.7 byte-compiled
78614728caSSascha Wildner!:mime application/x-bytecode.python
79c990e5baSDaniel Fojt0	belong		0xe5f20d0a	python 2.7 byte-compiled
80614728caSSascha Wildner!:mime application/x-bytecode.python
81c990e5baSDaniel Fojt0	belong		0xeff20d0a	python 2.7 byte-compiled
82614728caSSascha Wildner!:mime application/x-bytecode.python
83c990e5baSDaniel Fojt0	belong		0xf9f20d0a	python 2.7 byte-compiled
84614728caSSascha Wildner!:mime application/x-bytecode.python
85e4d4ce0cSPeter Avalos0	belong		0x03f30d0a	python 2.7 byte-compiled
86614728caSSascha Wildner!:mime application/x-bytecode.python
876fca56fbSSascha Wildner0	belong		0x04f30d0a	python 2.7 byte-compiled
88614728caSSascha Wildner!:mime application/x-bytecode.python
89*3b9cdfa3SAntonio Huete Jimenez0	belong		0x0af30d0a	PyPy2.7 byte-compiled
90*3b9cdfa3SAntonio Huete Jimenez!:mime application/x-bytecode.python
91c990e5baSDaniel Fojt0	belong		0xb80b0d0a	python 3.0 byte-compiled
92614728caSSascha Wildner!:mime application/x-bytecode.python
93c990e5baSDaniel Fojt0	belong		0xc20b0d0a	python 3.0 byte-compiled
94614728caSSascha Wildner!:mime application/x-bytecode.python
95c990e5baSDaniel Fojt0	belong		0xcc0b0d0a	python 3.0 byte-compiled
96614728caSSascha Wildner!:mime application/x-bytecode.python
97c990e5baSDaniel Fojt0	belong		0xd60b0d0a	python 3.0 byte-compiled
98614728caSSascha Wildner!:mime application/x-bytecode.python
99c990e5baSDaniel Fojt0	belong		0xe00b0d0a	python 3.0 byte-compiled
100614728caSSascha Wildner!:mime application/x-bytecode.python
101c990e5baSDaniel Fojt0	belong		0xea0b0d0a	python 3.0 byte-compiled
102614728caSSascha Wildner!:mime application/x-bytecode.python
103c990e5baSDaniel Fojt0	belong		0xf40b0d0a	python 3.0 byte-compiled
104614728caSSascha Wildner!:mime application/x-bytecode.python
105c990e5baSDaniel Fojt0	belong		0xf50b0d0a	python 3.0 byte-compiled
106614728caSSascha Wildner!:mime application/x-bytecode.python
107c990e5baSDaniel Fojt0	belong		0xff0b0d0a	python 3.0 byte-compiled
108614728caSSascha Wildner!:mime application/x-bytecode.python
109c990e5baSDaniel Fojt0	belong		0x090c0d0a	python 3.0 byte-compiled
110614728caSSascha Wildner!:mime application/x-bytecode.python
111c990e5baSDaniel Fojt0	belong		0x130c0d0a	python 3.0 byte-compiled
112614728caSSascha Wildner!:mime application/x-bytecode.python
113c990e5baSDaniel Fojt0	belong		0x1d0c0d0a	python 3.0 byte-compiled
114614728caSSascha Wildner!:mime application/x-bytecode.python
115c990e5baSDaniel Fojt0	belong		0x1f0c0d0a	python 3.0 byte-compiled
116614728caSSascha Wildner!:mime application/x-bytecode.python
117c990e5baSDaniel Fojt0	belong		0x270c0d0a	python 3.0 byte-compiled
118614728caSSascha Wildner!:mime application/x-bytecode.python
119f72f8299SJan Lentfer0	belong		0x3b0c0d0a	python 3.0 byte-compiled
120614728caSSascha Wildner!:mime application/x-bytecode.python
121c990e5baSDaniel Fojt0	belong		0x450c0d0a	python 3.1 byte-compiled
122614728caSSascha Wildner!:mime application/x-bytecode.python
123f72f8299SJan Lentfer0	belong		0x4f0c0d0a	python 3.1 byte-compiled
124614728caSSascha Wildner!:mime application/x-bytecode.python
125c990e5baSDaniel Fojt0	belong		0x580c0d0a	python 3.2 byte-compiled
126614728caSSascha Wildner!:mime application/x-bytecode.python
127c990e5baSDaniel Fojt0	belong		0x620c0d0a	python 3.2 byte-compiled
128614728caSSascha Wildner!:mime application/x-bytecode.python
129ff91a668SPeter Avalos0	belong		0x6c0c0d0a	python 3.2 byte-compiled
130614728caSSascha Wildner!:mime application/x-bytecode.python
131c990e5baSDaniel Fojt0	belong		0x760c0d0a	python 3.3 byte-compiled
132614728caSSascha Wildner!:mime application/x-bytecode.python
133c990e5baSDaniel Fojt0	belong		0x800c0d0a	python 3.3 byte-compiled
134614728caSSascha Wildner!:mime application/x-bytecode.python
135c990e5baSDaniel Fojt0	belong		0x8a0c0d0a	python 3.3 byte-compiled
136614728caSSascha Wildner!:mime application/x-bytecode.python
137c990e5baSDaniel Fojt0	belong		0x940c0d0a	python 3.3 byte-compiled
138614728caSSascha Wildner!:mime application/x-bytecode.python
139e8af9738SPeter Avalos0	belong		0x9e0c0d0a	python 3.3 byte-compiled
140614728caSSascha Wildner!:mime application/x-bytecode.python
141c990e5baSDaniel Fojt0	belong		0xb20c0d0a	python 3.4 byte-compiled
142614728caSSascha Wildner!:mime application/x-bytecode.python
143c990e5baSDaniel Fojt0	belong		0xbc0c0d0a	python 3.4 byte-compiled
144614728caSSascha Wildner!:mime application/x-bytecode.python
145c990e5baSDaniel Fojt0	belong		0xc60c0d0a	python 3.4 byte-compiled
146614728caSSascha Wildner!:mime application/x-bytecode.python
147c990e5baSDaniel Fojt0	belong		0xd00c0d0a	python 3.4 byte-compiled
148614728caSSascha Wildner!:mime application/x-bytecode.python
149c990e5baSDaniel Fojt0	belong		0xda0c0d0a	python 3.4 byte-compiled
150614728caSSascha Wildner!:mime application/x-bytecode.python
151c990e5baSDaniel Fojt0	belong		0xe40c0d0a	python 3.4 byte-compiled
152614728caSSascha Wildner!:mime application/x-bytecode.python
15382c5fa3eSPeter Avalos0	belong		0xee0c0d0a	python 3.4 byte-compiled
154614728caSSascha Wildner!:mime application/x-bytecode.python
155c990e5baSDaniel Fojt0	belong		0xf80c0d0a	python 3.5.1- byte-compiled
156614728caSSascha Wildner!:mime application/x-bytecode.python
157c990e5baSDaniel Fojt0	belong		0x020d0d0a	python 3.5.1- byte-compiled
158614728caSSascha Wildner!:mime application/x-bytecode.python
159c990e5baSDaniel Fojt0	belong		0x0c0d0d0a	python 3.5.1- byte-compiled
160614728caSSascha Wildner!:mime application/x-bytecode.python
161c990e5baSDaniel Fojt0	belong		0x160d0d0a	python 3.5.1- byte-compiled
162614728caSSascha Wildner!:mime application/x-bytecode.python
163c990e5baSDaniel Fojt0	belong		0x170d0d0a	python 3.5.2+ byte-compiled
164614728caSSascha Wildner!:mime application/x-bytecode.python
165c990e5baSDaniel Fojt0	belong		0x200d0d0a	python 3.6 byte-compiled
166614728caSSascha Wildner!:mime application/x-bytecode.python
167c990e5baSDaniel Fojt0	belong		0x210d0d0a	python 3.6 byte-compiled
168614728caSSascha Wildner!:mime application/x-bytecode.python
169c990e5baSDaniel Fojt0	belong		0x2a0d0d0a	python 3.6 byte-compiled
170614728caSSascha Wildner!:mime application/x-bytecode.python
171c990e5baSDaniel Fojt0	belong		0x2b0d0d0a	python 3.6 byte-compiled
172614728caSSascha Wildner!:mime application/x-bytecode.python
173c990e5baSDaniel Fojt0	belong		0x2c0d0d0a	python 3.6 byte-compiled
174614728caSSascha Wildner!:mime application/x-bytecode.python
175c990e5baSDaniel Fojt0	belong		0x2d0d0d0a	python 3.6 byte-compiled
176614728caSSascha Wildner!:mime application/x-bytecode.python
177c990e5baSDaniel Fojt0	belong		0x2f0d0d0a	python 3.6 byte-compiled
178614728caSSascha Wildner!:mime application/x-bytecode.python
179c990e5baSDaniel Fojt0	belong		0x300d0d0a	python 3.6 byte-compiled
180614728caSSascha Wildner!:mime application/x-bytecode.python
181c990e5baSDaniel Fojt0	belong		0x310d0d0a	python 3.6 byte-compiled
182614728caSSascha Wildner!:mime application/x-bytecode.python
183c990e5baSDaniel Fojt0	belong		0x320d0d0a	python 3.6 byte-compiled
184614728caSSascha Wildner!:mime application/x-bytecode.python
185c30bd091SSascha Wildner0	belong		0x330d0d0a	python 3.6 byte-compiled
186614728caSSascha Wildner!:mime application/x-bytecode.python
187c990e5baSDaniel Fojt0	belong		0x3e0d0d0a	python 3.7 byte-compiled
188614728caSSascha Wildner!:mime application/x-bytecode.python
189c990e5baSDaniel Fojt0	belong		0x3f0d0d0a	python 3.7 byte-compiled
190614728caSSascha Wildner!:mime application/x-bytecode.python
191*3b9cdfa3SAntonio Huete Jimenez
192*3b9cdfa3SAntonio Huete Jimenez# magic 3392+ implements PEP 552: Deterministic pycs
193*3b9cdfa3SAntonio Huete Jimenez0	name		pyc-pep552
194*3b9cdfa3SAntonio Huete Jimenez# the flag field determines how .pyc validity is checked
195*3b9cdfa3SAntonio Huete Jimenez>4	ulelong&1	0		timestamp-based,
196*3b9cdfa3SAntonio Huete Jimenez>>8	uledate		x		.py timestamp: %s UTC,
197*3b9cdfa3SAntonio Huete Jimenez>>12	ulelong		x		.py size: %d bytes
198*3b9cdfa3SAntonio Huete Jimenez>4	ulelong&1	!0		hash-based, check-source flag
199*3b9cdfa3SAntonio Huete Jimenez>>4	ulelong&2	0		unset,
200*3b9cdfa3SAntonio Huete Jimenez>>4	ulelong&2	!0		set,
201*3b9cdfa3SAntonio Huete Jimenez>>8	ulequad		x		hash: 0x%llx
202*3b9cdfa3SAntonio Huete Jimenez
203*3b9cdfa3SAntonio Huete Jimenez# uleshort magic followed by \x0d\0xa
204*3b9cdfa3SAntonio Huete Jimenez2		string		\x0d\x0a
205*3b9cdfa3SAntonio Huete Jimenez# extra check: only two bits of flag field are currently used
206*3b9cdfa3SAntonio Huete Jimenez>4		ulelong		<0x4
207*3b9cdfa3SAntonio Huete Jimenez# \x0d as part of magic should suffice till Python 3.14 (magic 3600)
208*3b9cdfa3SAntonio Huete Jimenez>>1		ubyte		0x0d		Byte-compiled Python module for
209614728caSSascha Wildner!:mime application/x-bytecode.python
210*3b9cdfa3SAntonio Huete Jimenez# now look at the magic number to determine the version
211*3b9cdfa3SAntonio Huete Jimenez>>>0		uleshort	<3400		CPython 3.7,
212*3b9cdfa3SAntonio Huete Jimenez>>>0		default		x
213*3b9cdfa3SAntonio Huete Jimenez>>>>0		uleshort	<3420		CPython 3.8,
214*3b9cdfa3SAntonio Huete Jimenez>>>>0		default		x
215*3b9cdfa3SAntonio Huete Jimenez>>>>>0		uleshort	<3430		CPython 3.9,
216*3b9cdfa3SAntonio Huete Jimenez>>>>>0		default		x
217*3b9cdfa3SAntonio Huete Jimenez>>>>>>0		uleshort	<3450		CPython 3.10,
218*3b9cdfa3SAntonio Huete Jimenez>>>>>>0		default		x
219*3b9cdfa3SAntonio Huete Jimenez>>>>>>>0	uleshort	<3500		CPython 3.11,
220*3b9cdfa3SAntonio Huete Jimenez>>>>>>>0	default		x		CPython 3.12 or newer,
221*3b9cdfa3SAntonio Huete Jimenez>>>0		use		pyc-pep552
222*3b9cdfa3SAntonio Huete Jimenez>>0		uleshort	240		Byte-compiled Python module for PyPy3.7,
223614728caSSascha Wildner!:mime application/x-bytecode.python
224*3b9cdfa3SAntonio Huete Jimenez>>>0		use		pyc-pep552
225*3b9cdfa3SAntonio Huete Jimenez>>0		uleshort	256		Byte-compiled Python module for PyPy3.8,
226614728caSSascha Wildner!:mime application/x-bytecode.python
227*3b9cdfa3SAntonio Huete Jimenez>>>0		use		pyc-pep552
228*3b9cdfa3SAntonio Huete Jimenez>>0		uleshort	336		Byte-compiled Python module for PyPy3.9,
229614728caSSascha Wildner!:mime application/x-bytecode.python
230*3b9cdfa3SAntonio Huete Jimenez>>>0		use		pyc-pep552
231c30bd091SSascha Wildner
232c990e5baSDaniel Fojt0	search/1/w	#!\040/usr/bin/python	Python script text executable
233c30bd091SSascha Wildner!:strength + 15
234c990e5baSDaniel Fojt!:mime text/x-script.python
235c990e5baSDaniel Fojt0	search/1/w	#!\040/usr/local/bin/python	Python script text executable
236c30bd091SSascha Wildner!:strength + 15
237c990e5baSDaniel Fojt!:mime text/x-script.python
238c990e5baSDaniel Fojt0	search/10/w	#!\040/usr/bin/env\040python	Python script text executable
239c30bd091SSascha Wildner!:strength + 15
240c990e5baSDaniel Fojt!:mime text/x-script.python
241e4d4ce0cSPeter Avalos
242e4d4ce0cSPeter Avalos
243e4d4ce0cSPeter Avalos# from module.submodule import func1, func2
2446fca56fbSSascha Wildner0	search/8192	import
245c990e5baSDaniel Fojt>0	regex		\^from[\040\t]+([A-Za-z0-9_]|\\.)+[\040\t]+import.*$	Python script text executable
246c30bd091SSascha Wildner!:strength + 15
247c990e5baSDaniel Fojt!:mime text/x-script.python
248e4d4ce0cSPeter Avalos
249e4d4ce0cSPeter Avalos# def __init__ (self, ...):
250e4d4ce0cSPeter Avalos0	search/4096	def\ __init__
251e4d4ce0cSPeter Avalos>&0	search/64 self	Python script text executable
252c30bd091SSascha Wildner!:strength + 15
253c990e5baSDaniel Fojt!:mime text/x-script.python
254c30bd091SSascha Wildner
255c30bd091SSascha Wildner# if __name__ == "__main__":
256c30bd091SSascha Wildner0 search/4096 if\ __name__
257c30bd091SSascha Wildner>&0 search/64 '__main__'	Python script text executable
258c30bd091SSascha Wildner>&0 search/64 "__main__"	Python script text executable
259c30bd091SSascha Wildner!:strength + 15
260c990e5baSDaniel Fojt!:mime text/x-script.python
261c30bd091SSascha Wildner
262c30bd091SSascha Wildner# import module [as abrev]
2636fca56fbSSascha Wildner0	search/8192	import
2646fca56fbSSascha Wildner>0	regex	\^import\ [_[:alpha:]]+\ as\ [[:alpha:]][[:space:]]*$ Python script text executable
265c990e5baSDaniel Fojt!:mime text/x-script.python
266e4d4ce0cSPeter Avalos
267e4d4ce0cSPeter Avalos# comments
268e8af9738SPeter Avalos#0	search/4096	'''
269e8af9738SPeter Avalos#>&0	regex	.*'''$	Python script text executable
270c990e5baSDaniel Fojt#!:mime text/x-script.python
271e4d4ce0cSPeter Avalos
272e8af9738SPeter Avalos#0	search/4096	"""
273e8af9738SPeter Avalos#>&0	regex	.*"""$	Python script text executable
274c990e5baSDaniel Fojt#!:mime text/x-script.python
275e4d4ce0cSPeter Avalos
276e4d4ce0cSPeter Avalos# try:
277e4d4ce0cSPeter Avalos# except: or finally:
278e4d4ce0cSPeter Avalos# block
279e4d4ce0cSPeter Avalos0	search/4096	try:
280c30bd091SSascha Wildner>&0	regex	\^[[:space:]]*except.*:$	Python script text executable
281c30bd091SSascha Wildner!:strength + 15
282c990e5baSDaniel Fojt!:mime text/x-script.python
283e4d4ce0cSPeter Avalos>&0	search/4096	finally:	Python script text executable
284c990e5baSDaniel Fojt!:mime text/x-script.python
285e8af9738SPeter Avalos
286c30bd091SSascha Wildner# class name[(base classes,)]: [pass]
2876fca56fbSSascha Wildner0	search/8192	class
2886fca56fbSSascha Wildner>0	regex	\^class\ [_[:alpha:]]+(\\(.*\\))?(\ )*:([\ \t]+pass)?$		Python script text executable
289c30bd091SSascha Wildner!:strength + 15
290c990e5baSDaniel Fojt!:mime text/x-script.python
291c30bd091SSascha Wildner
292c30bd091SSascha Wildner# def name(*args, **kwargs):
2936fca56fbSSascha Wildner0	search/8192	def\
2946fca56fbSSascha Wildner>0	regex	 \^[[:space:]]{0,50}def\ {1,50}[_a-zA-Z]{1,100}
2956fca56fbSSascha Wildner>>&0	regex	 \\(([[:alpha:]*_,\ ]){0,255}\\):$ Python script text executable
296c30bd091SSascha Wildner!:strength + 15
297c990e5baSDaniel Fojt!:mime text/x-script.python
298c990e5baSDaniel Fojt
299c990e5baSDaniel Fojt# https://numpy.org/devdocs/reference/generated/numpy.lib.format.html
300c990e5baSDaniel Fojt0	string	\223NUMPY		NumPy data file
301c990e5baSDaniel Fojt!:mime  application/x-numpy-data
302c990e5baSDaniel Fojt>6	byte	x			\b, version %d
303c990e5baSDaniel Fojt>7	byte	x			\b.%d
304c990e5baSDaniel Fojt#>8	leshort	x			\b, header length=%d
305c990e5baSDaniel Fojt>10	string	x			\b, description %s
306