You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Fernando461 <fe...@gmail.com> on 2010/04/15 16:49:52 UTC
And calling python
Hi,
I'd like to know if it's possible for a Ant to call a python script and pass
a parameter it retrieved from another source. After the python script
processes the entry, it should return the value to the Ant and it'd change
the value in the source.
Is it possible?
Thanks
--
View this message in context: http://old.nabble.com/And-calling-python-tp28256308p28256308.html
Sent from the Ant - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: And calling python
Posted by Steve Loughran <st...@apache.org>.
On 16/04/2010 00:56, Antoine Levy Lambert wrote:
> This would be more a user question. Anyway, ant can execute python with
> the <exec/> task.
> What is hard is to return something to ant. Maybe if the python script
> prints out what ant needs to capture on systemout,
> then using the outputproperty attribute of the exec task, you can store
> the output of the python script.
>
> Another possibility would be to have the python script create a property
> file which would be read by ant after executing the python script.
>
I'd look at jython and try doing this stuff in-JVM with <script> or the
related tasks; this will make it easier to integrate with ant
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: And calling python
Posted by Antoine Levy Lambert <an...@gmx.de>.
This would be more a user question. Anyway, ant can execute python with
the <exec/> task.
What is hard is to return something to ant. Maybe if the python script
prints out what ant needs to capture on systemout,
then using the outputproperty attribute of the exec task, you can store
the output of the python script.
Another possibility would be to have the python script create a property
file which would be read by ant after executing the python script.
Regards,
Antoine
Fernando461 wrote:
> Hi,
>
> I'd like to know if it's possible for a Ant to call a python script and pass
> a parameter it retrieved from another source. After the python script
> processes the entry, it should return the value to the Ant and it'd change
> the value in the source.
> Is it possible?
>
> Thanks
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org