Mar-02-2017, 02:34 PM
This is my project named ALMA pyconv. It is a converter for Python 2 source files written in ALMA Python syntax. I developed it for myself but I also published it so anyone else can use it.
This script :
- as web script, does a conversion on Python source files
(for example for run them by Skuplt),
so that the source can be written in ALMA Python syntax.
- as console script, does some additional jobs around Python source file
conversion before running pindent.py,
so that the source can be written in ALMA Python syntax.
A block does not need any indentation, but it can have free indentation style.
So the programmer have not worry about white spaces at all.
For example it is a valid ALMA Python code :
The programmer can apply any indentation style, for example :
This is the sourceforge.net project page :
sourceforge.net/projects/alma-pyconv
This is my latest test page :
teanarancs.net16.net/converter/converter.php
Recently it is only written in PHP 5. Later I maybe will write a much more faster version in FreeBASIC, but I am not sure, as this PHP script is good enough for me. (But for runnig in one step an ALMA Python script, the best option for me should be writing the FreeBASIC version though. Another option for speed up is to convert pyconv.php by phc, but I am not sure about it. In both cases the script converts the source script firstly then runs the Python interprerter.)
This script :
- as web script, does a conversion on Python source files
(for example for run them by Skuplt),
so that the source can be written in ALMA Python syntax.
- as console script, does some additional jobs around Python source file
conversion before running pindent.py,
so that the source can be written in ALMA Python syntax.
A block does not need any indentation, but it can have free indentation style.
So the programmer have not worry about white spaces at all.
For example it is a valid ALMA Python code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
a_ = 0 while a_ < 100 : c_ = "" if a_ = round (a_ / 2 ) * 2 : print a_ for b_ in range (a_) : c_ = c_ + "*" endfor print c_ endif a_ = a_ + 1 endwhile |
1 2 3 4 5 6 7 8 9 10 11 12 |
a_ = 0 while a_ < 100 : c_ = "" if a_ = round (a_ / 2 ) * 2 : print a_ for b_ in range (a_) : c_ = c_ + "*" endfor print c_ endif a_ = a_ + 1 endwhile |
sourceforge.net/projects/alma-pyconv
This is my latest test page :
teanarancs.net16.net/converter/converter.php
Recently it is only written in PHP 5. Later I maybe will write a much more faster version in FreeBASIC, but I am not sure, as this PHP script is good enough for me. (But for runnig in one step an ALMA Python script, the best option for me should be writing the FreeBASIC version though. Another option for speed up is to convert pyconv.php by phc, but I am not sure about it. In both cases the script converts the source script firstly then runs the Python interprerter.)