[Info-vax] in-memory editing with EDT or EVE
Arne Vajhøj
arne at vajhoej.dk
Sun Nov 24 19:27:35 EST 2024
On 11/23/2024 11:10 PM, Arne Vajhøj wrote:
> On 11/23/2024 10:35 PM, Arne Vajhøj wrote:
>> If somebody have a program that need to allow user to
>> edit data and the program is VMS specific and the target
>> editors are EDT and TPU, then maybe doing the edit in
>> memory makes sense.
>>
>> You can still argue that both subprocess with external editor
>> and temp file or simple callable editor editor with temp file is
>> simpler code wise using just the VMS provided API's and
>> not some wrapper found on the internet.
>>
>> But I like multiple options.
>
> I just created a JNI wrapper around the callable
> editor wrappers.
>
> So now the Groovy snippets:
>
> res = Edit.edt("A\nBB\nCCC")
> print(res)
>
> and:
>
> res = Edit.tpu("A\nBB\nCCC")
> print(res)
>
> work.
And using a normal shareable image and ctypes, then
it also works in Python:
import edit
res = edit.edt('A\nBB\nCCC')
print(res)
and:
import edit
res = edit.tpu('A\nBB\nCCC')
print(res)
https://www.vajhoej.dk/arne/vmsstuff/memedit/ updated
with JVM and Python examples.
Arne
More information about the Info-vax
mailing list