Guild.ipy incorrect home?

How does guild.ipy home get defined?

When I run

import guild.ipy as guild

guild.runs()

I get different results from the following (which feels like it should be default behavior)

import sys
guild_home = '{}/.guild'.format(sys.exec_prefix)
guild.set_guild_home(guild_home)

guild.runs()

By default Guild home is ~/.guild when not running in a virtual env. When running in a virtual env it’s <env home>/.guild.

You can change this from the CLI by setting GUILD_HOME env or by using the -H option right after the guild command:

guild -H <alt home> ...

When using guild.ipy you get the default location unless you use set_guild_home(path).

You can see what the path is with guild.config.guild_home():

>>> from guild import config
>>> config.guild_home()