Deutsch   English   Français   Italiano  
<6743c477$0$707$14726298@news.sunsite.dk>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Sun, 24 Nov 2024 19:27:35 -0500
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: in-memory editing with EDT or EVE
Newsgroups: comp.os.vms
References: <vhr9ct$1dilp$1@dont-email.me> <vhrd3u$1dqca$3@dont-email.me>
 <vhsm4i$1nfvc$1@dont-email.me> <vhsotb$rki$1@reader2.panix.com>
 <vht5qt$1qel2$1@dont-email.me> <vht6v1$1qfvl$1@dont-email.me>
 <vhtd6v$1rl0c$1@dont-email.me> <vhttf3$1u7an$1@dont-email.me>
 <vhu4gg$1v7cm$1@dont-email.me> <vhu6uc$20p3q$1@dont-email.me>
 <6742a745$0$707$14726298@news.sunsite.dk>
Content-Language: en-US
From: =?UTF-8?Q?Arne_Vajh=C3=B8j?= <arne@vajhoej.dk>
In-Reply-To: <6742a745$0$707$14726298@news.sunsite.dk>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 49
Message-ID: <6743c477$0$707$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 12fa96b8.news.sunsite.dk
X-Trace: 1732494455 news.sunsite.dk 707 arne@vajhoej.dk/68.14.27.188:52731
X-Complaints-To: staff@sunsite.dk
Bytes: 2325

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