Re: Ant scripting from Jython.

2003-06-16 Thread Jonathan Simon
r a in args.keys(): > > > setattr( t, a, args[a] ) > > > which turns your wrapper calls into: > > > > > > twrapper('echo', message='hello world') > > > twrapper('delete', quiet=1, dir=File('todir

Re: Ant scripting from Jython.

2003-06-16 Thread peter reilly
gt; twrapper('copy', file=File("fromfile"), todir=File("todir")) > > > > > -Original Message- > > > From: peter reilly [mailto:[EMAIL PROTECTED] > > > Sent: Friday, June 13, 2003 4:59 AM > > > To: Ant Developers

Re: Ant scripting from Jython.

2003-06-14 Thread mpfoemme
If anyone's curious, I've recently posted some code at sourceforge for a project called Pynt. It's a java-based scripting language designed for running builds, and it integrates fairly well with ant tasks. The code is in pretty rough shape, as I've been sort of "thinking out loud" as opposed to

RE: Ant scripting from Jython.

2003-06-13 Thread Jonathan Simon
ete', quiet=1, dir=File('todir')) > twrapper('mkdir', dir=File("todir")) > twrapper('copy', file=File("fromfile"), todir=File("todir")) > > > -Original Message----- > > From: peter reilly [mailto:[EMAIL

Re: Ant scripting from Jython.

2003-06-13 Thread Bruce Atherton
At 11:43 AM 6/13/2003 -0700, James Duncan Davidson wrote: Not that useful but a bit more grist for this mill. It certainly showed me that it is hard to cram the expressiveness of the XML approach into method calls. I had to limit myself to a very narrow subset of tasks and their usage patterns. It

RE: Ant scripting from Jython.

2003-06-13 Thread Albrecht, Matt
ile("todir")) twrapper('copy', file=File("fromfile"), todir=File("todir")) > -Original Message- > From: peter reilly [mailto:[EMAIL PROTECTED] > Sent: Friday, June 13, 2003 4:59 AM > To: Ant Developers List > Subject: Re: Ant scripting f

Re: Ant scripting from Jython.

2003-06-13 Thread James Duncan Davidson
On Thursday, Jun 12, 2003, at 22:23 US/Pacific, Conor MacNeill wrote: http://marc.theaimsgroup.com/?l=ant-dev&m=105516662409107&w=2 Instead of the "script driving Ant tasks" approach, is more like a script within a task. As such, the scripts would potentially be more focussed on the things that

Re: Ant scripting from Jython.

2003-06-13 Thread peter reilly
jython does support named parameters, one can do some bizarre stuff: from java.io import File def twrapper(taskname, **args): t = project.createTask(taskname) for a in args.keys(): exec("t.%s = %s" % (a, args[a])) t.execute() twrapper('echo', message="'hello world'") twrapper('delete

Re: Ant scripting from Jython.

2003-06-13 Thread Conor MacNeill
Hi Duncan, You all might like to look at two recent threads in ant-dev and ant-user that are somewhat related to this topic. http://marc.theaimsgroup.com/?l=ant-dev&m=105516662409107&w=2 and http://marc.theaimsgroup.com/?l=ant-user&m=10549510585&w=2 Instead of the "script driving Ant task

Re: Ant scripting from Jython.

2003-06-13 Thread James Duncan Davidson
On Thursday, Jun 12, 2003, at 13:20 US/Pacific, Jonathan Simon wrote: The last example is about ANT. I spoke to Erik (hatcher) and James (duncan davidson) about the whole abuse of XML in ANT proper not to mention all of the stuff on the ant-contrib project. Yep. I've been thinking for a while it'