Skip to main content

Python com palavras reservadas em Português

Project description

Pitão 🐍

Pitão Logo

Python com palavras reservadas em Português!

Pitão é um preprocessador Python que permite escrever código usando palavras reservadas em Português. Inspirado no Bython.


Instalação

pip install pitao

Ou para instalar localmente com uv:

git clone https://github.com/ivancrneto/pitao.git
cd pitao
uv sync

Galeria

Sintaxe Básica Controle de Fluxo


Exemplo de Código

Pitão suporta arquivos com extensão .pt ou .pit:

# ola_mundo.pt (ou ola_mundo.pit)
def ola_mundo():
    imprimir("Olá, Mundo!")

se __nome__ == "__principal__":
    ola_mundo()

Execute com:

pitao ola_mundo.pt
# ou
pitao ola_mundo.pit

Palavras Reservadas

Português Python
Falso False
Verdadeiro True
Nulo None
e and
ou or
nao not
se if
senaose elif
senao else
para for
enquanto while
quebre break
continue continue
def def
classe class
retorne return
produza yield
tente try
exceto except
finalmente finally
levante raise
assincrono async
aguarde await
importe import
de from
como as
em in
eh is
com with
afirme assert
del del
global global
naolocal nonlocal
lambda lambda
passe pass

Funções Built-in

Pitão também suporta a tradução de algumas funções built-in do Python:

Português Python
imprimir() print()
entrada() input()
abrir() open()
inteiro() int()
flutuante() float()
texto() str()
booleano() bool()
lista() list()
dicionario() dict()
conjunto() set()
tupla() tuple()
tamanho() len()
intervalo() range()
enumerar() enumerate()
juntar() zip()
ordenar() sorted()
inverter() reversed()
somar() sum()
maior_de() max()
menor_de() min()

Comandos

pitao - Executar arquivos Pitão

pitao arquivo.pt [args...]     # Executa o arquivo
pitao -c arquivo.pt            # Compila para .py sem executar
pitao -k arquivo.pt            # Executa e mantém o .py gerado
pitao -v arquivo.pt            # Modo verbose

pt2py - Traduzir Pitão para Python

pt2py arquivo.pt               # Cria arquivo.py
pt2py -o saida.py arquivo.pt   # Especifica nome de saída

py2pt - Traduzir Python para Pitão

py2pt arquivo.py               # Cria arquivo.pt
py2pt -o saida.pt arquivo.py   # Especifica nome de saída

Licença

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pitao-0.2.4.tar.gz (768.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pitao-0.2.4-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file pitao-0.2.4.tar.gz.

File metadata

  • Download URL: pitao-0.2.4.tar.gz
  • Upload date:
  • Size: 768.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pitao-0.2.4.tar.gz
Algorithm Hash digest
SHA256 dea20e84b87f0d7133d5984b8cc50f7bcd34de4878b92271d71a97203ba80941
MD5 2ab37eae4c637f7c89e9fcf31d6504f2
BLAKE2b-256 a0792e4d3ee7939faed200666d2b5cac1716d21af8f44e8654ac39a98ce0e95a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pitao-0.2.4.tar.gz:

Publisher: publish.yml on ivancrneto/pitao

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pitao-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: pitao-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pitao-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 423fde2f10a6adec38f0e94763a4d1a43f3403754e599b2dde550a80d9194606
MD5 94f421237b61021730dbc1560b983a4c
BLAKE2b-256 8fc5d002737c9da8df4bec19430695f4e635d00e08e87dc2ac4919ff074c18fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pitao-0.2.4-py3-none-any.whl:

Publisher: publish.yml on ivancrneto/pitao

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page