[Info-vax] in-memory editing with EDT or EVE

Arne Vajhøj arne at vajhoej.dk
Sun Nov 24 19:51:22 EST 2024


On 11/24/2024 7:33 PM, Lawrence D'Oliveiro wrote:
> On Sun, 24 Nov 2024 19:27:35 -0500, Arne Vajhøj wrote:
>> And using a normal shareable image and ctypes, then it also works in
>> Python:
> 
> Soon as you mentioned “ctypes”, I had to have a look. ;)
> 
> I’m not a fan of wildcard imports. I know you tend to need a lot of stuff
> from ctypes, but I prefer to do
> 
>      import ctypes as ct
> 
> so you can then write
> 
>      memedit.memedt.argtypes = [ct.c_char_p, ct.c_char_p, ct.c_int]
>      memedit.memedt.restype = ct.c_int
> 
> etc.

I have an algorithm to decide whether to wildcard import
or not:

wildcardimport = isOnlyOptionInLanguage() ? true : (isScriptLanguage() ? 
rng.nextDouble() > 0.1 : rng.nextDouble() > 0.9)

:-)

Arne



More information about the Info-vax mailing list