Swifty <
steve....@gmail.com> wrote:
>On 16/11/2013 09:35, pg wrote:
>> I understand, there is NOTHING like REXX PARSE in Phyton
>
>In your situation I'd try one of these approaches:
>
>1. Write my own PARSE() function in Python (I have no idea if Python
> supports user written functions)
It does support user-written stuff, and it also already has numerous ways of
parsing things, including much more sophisticated support than REXX has, eg
building parse trees...
It probably doesn't have a single function that can be used in as many
different ways as our parse though; the programmer probably has to look for
the best tool for what they want to do.
The stackoverflow website/forum is a good place to find hints on programming
in many languages, so for example:
http://stackoverflow.com/questions/5749195/how-can-i-split-and-parse-a-string-in-python
For lots of links to info about building parsers in / via Python:
http://nedbatchelder.com/text/python-parsers.html
Most of that is too complex I think, but see the stuff mentioned at
"Standard Modules" ... and read the Python docs for those modules.
--
Jeremy C B Nicoll - my opinions are my own.
Email sent to my from-address will be deleted. Instead, please reply
to
newsre...@wingsandbeaks.org.uk replacing "aaa" by "284".