On 21/11/21 9:16 pm, M A wrote:
How do I make a program using rpython?
Say I have this file:
def main():
for i in range(100):
print("hello world"),
if __name__ == "__main__":
main()
How would I turn it into an executable file using rpython?
The canonical starting place for rpython is this page [0] in the rpython
documentation. It is a bit old, so please raise an issue if something
does not work right. There are some examples in
rpython/translator/goal/, the targetnopstandalone.py one is close to
what you are trying to do. If you call
python2 rpython/bin/rpython -O2
rpython/translator/goal/targetnopstandalone.py
you will get an executable in
$tmp/usession*/testing_1/targetnopstandalone-c that will print "hello world"
Matti
[0] https://rpython.readthedocs.io/en/latest/getting-started.html
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev