Novel Thoughts on Scripting and Languages
James Huang
judoscript at hotmail.com
Thu Jan 9 01:30:19 EST 2003
sandskyfly at hotmail.com (Sandy Norton) wrote in message news:<b03e80d.0301080707.32fa64a5 at posting.google.com>...
> judoscript at hotmail.com (James Huang) wrote in message
>
> > So you went to the whitepaper, searched on "jython" in the browser and
> > finished your research (actually, search)? Doing a language is a huge
> > undertaking; it would indeed be ludicrous to start one without looking
> > around first.
>
> I didn't merely search on 'jython', I actually followed some of the
> examples through. Actually, it first reminded me a little bit of rebol
> which has some nifty high level commands like "send person at address.com
> file.txt". My initial reaction to that was "wow, that's cool... let me
> try rebol out". After a few attempts to use the language, I got
> somewhat frustrated with the syntax and semantics and decided to write
> a module called 'rebol.py' instead, implementing the functionality I
> could use on top of the python standard library infrastructure. So now
> I can write
>
> >>> from rebol import send
> >>> send('person at address.com', 'file.txt')
>
> My approach to your examples would be similar. I would use elements of
> the python standard library and implement my 'preferred level' of
> abstraction.
>
> so for this particular example:
>
> > -------------------------------------
> > copy '*.java, *.jj' in '~/src/' except '*Test*, *test*'
> > recursive
> > into '~/archive/src_' @ date().fmtDate('yyyy-MM-dd') @ '.jar';
> > -------------------------------------
>
> >>> from pathlib import Path
> >>> from time import strftime, gmtime
> >>> src = Path('~/src/',
> glob=['*.java', '*.jj'],
> skip=['*Test*', '*test*'],
> recursive=True)
>
> >>> dst = Path(r'~/archive/src_') + strftime("%y-%m-%d", gmtime()) +
> '.zip'
> >>> src.copy(dst)
>
> Now your example may be shorter, but I daresay mine is a little bit
Pls refer to my response to Neil Hodgson, if you like.
> more flexible, as I could now do:
>
> >>> src.delete()
>
> I applaud your efforts to develop a language that conforms to your
> needs... but somehow, I just prefer Python.
Thank you, I understand.
>
> Sandy
-James
More information about the Python-list
mailing list