On Thu, Jan 29, 2015 at 11:49 AM, Matt Wilkie <map...@gmail.com> wrote:
> Leo looks for HOME environment variable first (which isn't usually defined > in Windows), if that doesn't exist it checks for HOMEDRIVE\HOMEPATH (which > is defined, unless you mess with it, strongly not advised). On Win7 this > looks like: > > HOMEDRIVE=C: > HOMEPATH=\Users\matt > > If you want to control where .leo goes, set "HOME=D:\mystuff" in your > user variables, or the shell which starts Leo (c.f. > http://www.computerhope.com/issues/ch000549.htm) > Leo calculates the home directory in the computeHomeDir method in leoApp.py. Here it is: def computeHomeDir(self): """Returns the user's home directory.""" home = os.path.expanduser("~") # Windows searches the HOME, HOMEPATH and HOMEDRIVE # environment vars, then gives up. if home and len(home) > 1 and home[0]=='%' and home[-1]=='%': # Get the indirect reference to the true home. home = os.getenv(home[1:-1],default=None) if home: # Important: This returns the _working_ directory if home is None! # This was the source of the 4.3 .leoID.txt problems. home = g.os_path_finalize(home) if ( not g.os_path_exists(home) or not g.os_path_isdir(home) ): home = None return home Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.