ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hughitt" <keith.hugh...@gmail.com>
Subject Trouble executing python script in Unix
Date Tue, 15 Jul 2008 20:35:14 GMT
Hi all,

I've just recently started using Ant on Linux, and so far it has been really
amazing. I've run into
one problem, however, that I haven't been able to get past.

I would like to call an external script (a python script to minimize some
JavaScript files),
but have not been able to get it to execute properly. I searched around
some, and found
an earlier thread (http://marc.info/?l=ant-user&m=115078380228196&w=2)
where someone with a similar problem was able to fix things setting
"resolveexecutable" to true.
This works for me when I try running a dummy script with no arguments, e.g:

...
<exec dir="./" executable="test.py" resolveexecutable="true"/>
...

[exec] Hello World


When I try and do something requiring command-line arguments though I can't
get it to work:

        <exec dir="./" executable="python" resolveexecutable="true">
            <arg value="install/tools/jsmin.py"/>
            <arg value="&lt;${libs}/build/test.js&gt;"/>
            <arg value="${libs}/build/testl-min.js"/>
        </exec>

I've tried executing both "python" (and passing the scripts name as an
argument), and the script itself.
Nothing seems to work. The command executes fine from the command-line, and
what even more, when
I print the arguments passed to the python script using argv, and then
string them together and run them
it works fine, but still no luck when I try to get it working through ant.

Anyone have any suggestions as to what might be the problem?

Any help would be greatly appreciated.

Thanks,
Keith

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message