
At 07:53 PM 3/17/2011 -0400, Carl Meyer wrote:
FWIW, I've pushed a reworking of the config-file-finding, with the following shed-paint color choices:
- File is named <executable-name>.virtual.conf (I kept the .virtual,
despite it being longer and not strictly necessary, because I think it more clearly expresses the function of the file. The existence or absence of this file changes Python's behavior significantly, so I think its name should be quite explicit.)
- <executable-name> has the extension stripped on Windows, but not
otherwise.
This combination should work well on Windows, where the default explorer settings will show e.g. 'python.virtual' next to 'python' in the directory. (Windows strips suffixes from display by default, and moves them to a "type" column.)
- I eliminated any form of generically-named config file, as I think the
extra possible names (and thus possible sources of confusion) is not really worth the benefit. The only use case I can think of is if you have multiple python binaries or symlinks next to each other and want them all to use the same virtual config - and I can't really think why you'd want multiple binaries in that case.
The main reason I'd use differently-named binaries would be if I were shipping multiple runnable applications that I wanted to look to users like true .exe's. I don't see a reason why I wouldn't use separate .virtual.conf files, though, especially if their contents are minimal.
(Awesomeness bonus: if the executable put *itself* on sys.path, and ran __main__, you could simply tack a zipfile on the end of the .exe and have a ready-to-run application.)