Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run python script in PyPy

Tags:

python

pypy

I have a python script developed in Spyder using Python 2.7.4. This script is called from another python script using:

execfile('script.py')

I'd like to know how can I run both python scripts using PyPy (I'd like this because it is faster than standard Python). Thanks!

P.S.: I've already installed PyPy in Windows.

like image 762
jpcgandre Avatar asked Mar 23 '23 22:03

jpcgandre


1 Answers

Run the first Python script using pypy scriptname.py on the command line. The code run by execfile() will also be run in PyPy, because the main script (execfile()) is being run in PyPy.

like image 54
kindall Avatar answered Apr 07 '23 02:04

kindall