Hello, Actually I did the opposite to be able to use Python 3 libraries from Pharo. It is not complete, but you may want to take a look at it [1]. Using this lib you can craft a Python 3 AST and generate its source code. I guess there is a way to access the AST of a Python program using the API. Now, you have to see if it is always possible to convert a Python AST to a Pharo AST. One day, I read about someone that converted Python to Ruby (or the opposite) using bytecode translation. Maybe it is another way to do it. Julien Links: [1]: https://github.com/juliendelplanque/Python3Generator On 02/06/17 17:20, askoh wrote:
Python and JavaScript are driving the movement to Dynamic Languages. In particular, Python is the language of choice to teach students programming in universities. So, Smalltalk stands to gain from this shift. We all know that Smalltalk has the best environment. But we lack the diverse code base. Can we patch that gap with automatic translation from Python to Smalltalk? How feasible would it be to auto translate SciPy to SciSmalltalk? Even if it is imperfect, can we cut the effort by 50% or 80%?
All the best, Aik-Siong Koh
-- View this message in context: http://forum.world.st/Can-we-auto-translate-Python-to-Smalltalk-tp4949015.ht... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.