GithubHelp home page GithubHelp logo

tela's Introduction

Tela and Graficos.py

First version of code written in 2002 for Python 2.x.

It still very old, but it is running in Python 3.12.

The idea is to enhance the code and make it more Pythonic. After +20 years unchanged, it needs some care.

Source: https://www.nilo.pro.br/python/index.html

Installing

  • You need Python 3.12
  • Poetry is prefered, but if your pip already supports pyproject.toml, you are ready.
poetry install
poetry shell

Playing with

Start tela.py

Tela is the drawing screen. It is a simple TCP/IP server that receive even simples commands in a socket. The code still very fragile, but it will enhanced over time. Tela means screen in Brazilian Portuguese.

python tela.py &

Start graficos.py

Graficos has the commands needed to interact with tela.py

python -i graficos.py

Then, start drawing:

>>> limpa(20, 20)  # Creates a 20x20 grid
>>> ponto(1,1) # Plots a dot at x=1, y=1
>>> cor(255,128,1) # Sets the color of next dot to red=255, green=128 and blue=1
>>> imprima_pontos()  # prints all previously sent commands

tela's People

Contributors

lskbr avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.