Python's keywords and functions convertor into native language for lowering entrance barrier

Hi, My name is Murat, I am from Bishkek, Kyrgyz Republic (Central Asia). First off let me apologize if I chose a wrong mailing list (please, kindly point me a right mailing list to go). I am new to programming and I started from Python because it's very smooth and readable lang. But it would not be easy for me to start learning programming concepts without knowing basic English. What I want to ask is is it possible to create a (buffer/middleware) keywords and functions convertor-from-pythonese-English-to-pythonese-Kyrgyz (and vice-versa) so that students with poor/no English could start learning to code in their native language(s)? i.e. print / басуу, if / эгерде, else / болбосо, elif / же болбосо etc. I am impressed by the guy who have invented an arabic programming language in order to overcome a (natural) language barrier: http://killscreendaily.com/headlines/arabic-programming-language-middle-east... But I think it's more rational to write a native-to-pythonese-convertor rather than inventing a new language from scratch. Can anyone tell me from where to start? Thank you.

On Wed, Jan 30, 2013 at 1:10 AM, Murat Jumashev <jumasheff@gmail.com> wrote:
Hi, My name is Murat, I am from Bishkek, Kyrgyz Republic (Central Asia). First off let me apologize if I chose a wrong mailing list (please, kindly point me a right mailing list to go).
I am new to programming and I started from Python because it's very smooth and readable lang. But it would not be easy for me to start learning programming concepts without knowing basic English.
What I want to ask is is it possible to create a (buffer/middleware) keywords and functions convertor-from-pythonese-English-to-pythonese-Kyrgyz (and vice-versa) so that students with poor/no English could start learning to code in their native language(s)? i.e. print / басуу, if / эгерде, else / болбосо, elif / же болбосо etc.
I am impressed by the guy who have invented an arabic programming language in order to overcome a (natural) language barrier: http://killscreendaily.com/headlines/arabic-programming-language-middle-east...
But I think it's more rational to write a native-to-pythonese-convertor rather than inventing a new language from scratch. Can anyone tell me from where to start?
It is certainly possible to change Python to use non-English keywords; see http://sourceforge.net/projects/chinesepython/ for an example. If you google for "chinese Python" you will find other links of interest that *might* lead you to other translations. If you can't find the information from the above link, someone on the python-dev mailing list might be able to help you as to which file needs to be modified. HOWEVER ... I don't believe that this will give you a translation of all the built-in functions and certainly not of any of the resources from the standard library. (I'm thinking that your students might want to use the Math module at some point). André
Thank you.
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig

Hi Murat -- I presume you know that Python 3 source code may use any Unicode strings for names, including variables, functions, classes and so on. That leaves 33 keywords in English.
import keyword keyword.kwlist
You can write a script that simply catalogs synonyms for builtins.
басуу = print басуу(10) 10
'print' is not a keyword in Python 3 so this assigning of a Kyrgyz name is possible. So if you had a script named kyrgyz.py, you could provide many synonyms for common functions such as dir, input, and even type names such as str, list, int, dict, float. However, what dir( ) returns will still contain English much of the time. The Standard Library is in English. This compromise solution that keeps the 33 English keywords at a minimum will help students learn to read more Python written by others. They won't need a "special Python" to interpret the code. The documentation, docstrings, variable, function, class names etc. can all be in Krgyz even now, with no further modifications. I work with a programmer in Indonesia who sometimes sends me Python that's 90% Indonesian. Here's a Wiki page on the topic of Python in non-Latin1-languages: http://wiki.python.org/moin/Languages Kirby Sample source (Kazakh): # -*- coding: utf-8 -*- # python 3.0/3.1 сәлем = ['Қайырлы таң', 'Қайырлы күн', 'Қайырлы жаріқ'] менйм_атйм = ['Арүжан', 'Меиржан'] for сәлемx in сәлем: for менйм_атймx in менйм_атйм: print(сәлемx + ' ' + менйм_атймx)

Hi, Kirby, André Thank you so much for your advices, links and ideas! I admit that non-english programming approach has more cons than pros, but it will definitely help Kyrgyz young people to understand the basic coding consepts. At this time, for them code samples written in pure python may look like the following piece of code for american (or english speaking) children: балдар = ["Асан", "Азамат", "Мурат", "Куман"] салам = "Салам, " арбир бала ичинен балдар: чыгар салам + бала This was a sample for loop :) The whole idea is not about teaching coding only in Kython (let's call Kyrgyz version of Python this way :) ), but it is rather about showing them in the very first classes that programming is not that awfully complicated and dull as they thought. After they master basic Kython, it is probably useful to slightly move to Python. I'll write as I move on this, if it's interesting for you. You can always find me in Google+ https://plus.google.com/106158508876298632579/posts Thank you! 2013/1/31 kirby urner <kirby.urner@gmail.com>
Hi Murat --
I presume you know that Python 3 source code may use any Unicode strings for names, including variables, functions, classes and so on.
That leaves 33 keywords in English.
import keyword keyword.kwlist
You can write a script that simply catalogs synonyms for builtins.
басуу = print басуу(10) 10
'print' is not a keyword in Python 3 so this assigning of a Kyrgyz name is possible.
So if you had a script named kyrgyz.py, you could provide many synonyms for common functions such as dir, input, and even type names such as str, list, int, dict, float.
However, what dir( ) returns will still contain English much of the time. The Standard Library is in English.
This compromise solution that keeps the 33 English keywords at a minimum will help students learn to read more Python written by others. They won't need a "special Python" to interpret the code.
The documentation, docstrings, variable, function, class names etc. can all be in Krgyz even now, with no further modifications.
I work with a programmer in Indonesia who sometimes sends me Python that's 90% Indonesian.
Here's a Wiki page on the topic of Python in non-Latin1-languages:
http://wiki.python.org/moin/Languages
Kirby
Sample source (Kazakh):
# -*- coding: utf-8 -*- # python 3.0/3.1 сәлем = ['Қайырлы таң', 'Қайырлы күн', 'Қайырлы жаріқ'] менйм_атйм = ['Арүжан', 'Меиржан'] for сәлемx in сәлем: for менйм_атймx in менйм_атйм: print(сәлемx + ' ' + менйм_атймx)

I think Kython is a wonderful idea, and corresponding trainers in any Unicode language. Ideally there'd be a Kython -> Python translator, even at the source code level, that only swapped in the Python keywords, builtins, special names, Standard Library names. This looks like a "round trip" exercise (goes both ways), meaning any Unicode community might craft something similar. Given the isomorphisms involved (no information is lost), it seems possible to translate from any to any. Yes, that makes it sounds easier than it is. Something to chip away at over time. Kirby

Murat, It's a hack, but it's also possible to pre-process the source code. Check out PEP 263 <http://www.python.org/dev/peps/pep-0263/>. Luciano Ramalho <http://twitter.com/ramalhoorg> published<http://www.python.org.br/wiki/LinguagemSucuri>his project Sucuri <https://code.google.com/p/propython/source/browse/mafua/sucuri>(native brazilian name for Python) as an exercise inspired by a blog post from <http://benjiyork.com/blog/2008/02/programmable-python-syntax-via-source.html>Benji York<http://benjiyork.com/blog/2008/02/programmable-python-syntax-via-source.html> . This would enable you to "remap" all the keywords. Using this combined with Kirby's strategy may be enough to introduce programing to your students with simple projects written in their native language. All the best, -- Henrique Bastos <http://henriquebastos.net> Twitter: @henriquebastos <http://twitter.com/henriquebastos> Skype: henriquebastos.net +55 21 9618-6180 On Sun, Feb 3, 2013 at 12:44 AM, kirby urner <kirby.urner@gmail.com> wrote:
I think Kython is a wonderful idea, and corresponding trainers in any Unicode language.
Ideally there'd be a Kython -> Python translator, even at the source code level, that only swapped in the Python keywords, builtins, special names, Standard Library names.
This looks like a "round trip" exercise (goes both ways), meaning any Unicode community might craft something similar.
Given the isomorphisms involved (no information is lost), it seems possible to translate from any to any.
Yes, that makes it sounds easier than it is. Something to chip away at over time.
Kirby
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
participants (4)
-
Andre Roberge
-
Henrique Bastos
-
kirby urner
-
Murat Jumashev