stephendeyoung / python-in-racket

A basic implementation of Python in Racket
10 stars 1 forks source link

How to run python-in-racket? #1

Open mangpo opened 10 years ago

mangpo commented 10 years ago

Hi,

I'm looking for a python interpreter implemented in racket, and I come across this project. I want to try running some python programs, but I don't know how. Can you give me a simple instruction on how to use your tool to interpret a python file. Thank you!

stephendeyoung commented 10 years ago

I haven't touched this repo in a long time so I'm not sure if this will work but you'll need to clone the repo and then run:

echo "print(5)" | racket python-main.rkt --python-path your/python/path --interp-py

This project came out of a course I did at Brown University called 'Introduction to Programming Languages':

http://cs.brown.edu/courses/csci1730/2012/

To be honest you'd probably be better off following the Python assignments for that course rather than using my repo since that will give a better explanation of what's going on:

http://cs.brown.edu/courses/cs173/2012/Assignments/Python1/ http://cs.brown.edu/courses/cs173/2012/Assignments/Python2 http://cs.brown.edu/courses/cs173/2012/Assignments/Python3

Also this repo is actually a fork of Brown's repo:

https://github.com/brownplt/cs173-python

Hope that's helpful.

mangpo commented 10 years ago

Thank you for the reply!