ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Resnick" <abune...@gmail.com>
Subject RE: "import re" with jython
Date Tue, 01 Mar 2005 06:03:32 GMT
For the record, here is the very simple solution to the problem:

I was trying to use jython.jar without any of the other files that come with
Jython. 

Jython automatically sets as its import path a sub-directory below
jython.jar named Lib. This directory needs to hold the Lib dir from the
Jython distro.

David

-----Original Message-----
From: David Resnick [mailto:abunetta@gmail.com] 
Sent: Thursday, February 24, 2005 15:49
To: 'user@ant.apache.org'
Subject: "import re" with jython

I'm trying to use the jython re module in ant from a script task.
I have added the jython.jar library to my classpath, and can use various
function of python.

But when I try to import re, I get the following:

check:
   [script] Traceback (innermost last):
   [script]   File "<string>", line 2, in ?
   [script] ImportError: no module named re

This is the target I'm trying to run:

	<target name="check">
		<script language="jython">
import re
		</script>
	</target>

Thanks, David


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message