When I started using python, I disliked the use of white space indentation to denote code structure so much that I decided to try to hack python to override this feature.
I managed to hack python so that I can use 'end' keywords (like Matlab) to denote the end of loops and code structures. I do this by intercepting the decoded
file before it goes to the interpreter.
The video below shows how I did this and the scripts are available from the link at the bottom of the page.
Warning!! This is a hack that I just did for fun (although I do program in pythonen now!).
There are some rules to follow if you really want to use this.
1. 'end' becomes a reserved keyword, so shouldn't be used for variable names, etc.
2. Some scripts don't deal with continuation lines unless you use a backslash to denote the continuation.
3. You need to auto-indent your pythonen code before running it, however, it is also possible to include the auto-indent script in the encoding file, in which case you can have your code indented however you like in pythonen.
No warranty given. Use at your own risk.
I might look into modifying cpython to make a proper pythonen interpreter. |