Skip to content

🐍 Python CLI to parse C programs with graphics.h dependency

License

Notifications You must be signed in to change notification settings

godcrampy/py-graphics-h

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PYCC: Python Parser for graphics.h

This is a CLI to read, interpret and execute C programs having graphics.h dependency. At its core, it is a small interpreter for C with support for graphics.h

Supported Functions

  • initgraph
  • getchar or getch
  • closegraph
  • outtextxy
  • setcolor
  • arc
  • bar
  • line
  • rectangle
  • ellipse
  • fillellipse
  • fillpoly
  • fillcircle
  • drawpoly
  • getfontcolor
  • pieslice
  • sector
  • cleardevice
  • getmaxx
  • getmaxx

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need pipenv or any other virtual environment tool.

$ pip install pipenv

Installing

Install the dependencies:

$ pipenv install

Usage

# setup shell in root of this repo
$ pipenv shell

$ ./pycc <path/to/main.c>

Running Samples

$ ./pycc samples/sample.c

$ ./pycc samples/car.c 

$ ./pycc samples/smiley.c 

Running the tests

Unit Tests

$ pipenv run test

Coverage

$ pipenv run cov

Built With

License

This project is licensed under the MIT License - see the LICENSE file for details

About

🐍 Python CLI to parse C programs with graphics.h dependency

Topics

Resources

License

Stars

Watchers

Forks

Packages