.pyx Python script
Text & source code
| MIME type | text/x-python |
|---|---|
| Description | Python script |
| Category | Text & source code |
| Signature (magic bytes) | 23 21 20 2F 62 69 6E 2F 70 79 74 68 6F 6E (#! /bin/python)23 21 2F 62 69 6E 2F 70 79 74 68 6F 6E (#!/bin/python) |
| Based on | application/x-executable, text/plain |
| Other extensions | .py, .wsgi |
Frequently asked questions
What is a .pyx file?
A .pyx file is a “Python script” (MIME type text/x-python).
How do I open a .pyx file?
With any text editor – Notepad++, Visual Studio Code, or gedit and vim on Linux. The file contains readable text, possibly source code or configuration.
How can you tell a genuine .pyx file?
By the bytes at the start of the file, the signature (magic bytes): 23 21 20 2F 62 69 6E 2F 70 79 74 68 6F 6E (#! /bin/python) and 23 21 2F 62 69 6E 2F 70 79 74 68 6F 6E (#!/bin/python). On Linux and macOS, file --mime-type example.pyx checks the real type regardless of the extension.
Which format is .pyx based on?
Technically a .pyx file is a subtype of “Executable” (application/x-executable), so programs for that base format can often read it too.
Which MIME type belongs to .pyx?
The MIME type is text/x-python. In the Apache web server: AddType text/x-python .pyx; in nginx: types { text/x-python pyx; }.