Hello. I am new to groovy, assigned an effort to convert legacy python
scripts to groovy replacements. We are doing this in an effort to decouple
from dependencies on the jython engine in NiFi for scripts we run from its
ExecuteScript processor.

In one of these python scripts, this gets done to an encoded string that
represents a disk file path:

import urllib
.
.
.
result['fileURL'] = urllib.quote(temp_result['fileURL'].encode('utf8'))

Based on my initial research (though very limited understanding), it
appears that the urllib.quote() is intended to quote reserved characters in
a path. I haven't been able to find the function that serves an equivalent
purpose in Groovy. Can anyone show me how this should be accomplished?

I should add that I have successfully replaced the python dictionary
structures you see above and calls to manipulate the same with Groovy Map
operations.

Thanks in advance for any help.  - Jim

Reply via email to