.pyi Script Python 3
Testo e codice sorgente
| Tipo MIME | text/x-python3 |
|---|---|
| Descrizione | Script Python 3 |
| Categoria | Testo e codice sorgente |
| Firma (magic bytes) | 23 21 20 2F 62 69 6E 2F 70 79 74 68 6F 6E 33 (#! /bin/python3)23 21 2F 62 69 6E 2F 70 79 74 68 6F 6E 33 (#!/bin/python3) |
| Basato su | text/x-python |
| Altre estensioni | .py, .py3, .py3x |
Domande frequenti
Che cos’è un file .pyi?
Un file .pyi è un formato di tipo «Script Python 3» (tipo MIME text/x-python3).
Come apro un file .pyi?
Con qualsiasi editor di testo: Notepad++, Visual Studio Code, oppure gedit e vim su Linux. Il file contiene testo leggibile, eventualmente codice sorgente o configurazione.
Come si riconosce un vero file .pyi?
Dai byte all’inizio del file, la firma (magic bytes): 23 21 20 2F 62 69 6E 2F 70 79 74 68 6F 6E 33 (#! /bin/python3) e 23 21 2F 62 69 6E 2F 70 79 74 68 6F 6E 33 (#!/bin/python3). Su Linux e macOS, file --mime-type example.pyi verifica il tipo reale indipendentemente dall’estensione.
Su quale formato si basa .pyi?
Tecnicamente un file .pyi è un sottotipo di «Script Python» (text/x-python), quindi i programmi per quel formato di base spesso riescono a leggerlo.
Quale tipo MIME corrisponde a .pyi?
Il tipo MIME è text/x-python3. Nel server web Apache: AddType text/x-python3 .pyi; in nginx: types { text/x-python3 pyi; }.