[Ipe-discuss] Checking HOSTNAME in an ipelet

Otfried Cheong otfried at ipe.airpost.net
Tue Nov 9 00:43:58 CET 2010


Dmitriy Morozov wrote:
> I know nothing about Lua, so this question is probably stupid, but
> that just means someone can answer it easily.
> 
> I'm trying to customize window size and autosave_filename depending on
> the HOSTNAME set in the environment. I have a my_prefs.lua ipelet that
> tries to do something like
> 
> if os.getenv("HOSTNAME") == "cole" then

Ipelets run in a protected environment.

Use _G.os.getenv to access the getenv function.

Otfried




More information about the Ipe-discuss mailing list