[IronPython] Saving sys.path
briandorsey at gmail.com
Wed Apr 27 23:09:20 CEST 2005
On 27/04/05, Keith J. Farmer <kfarmer at thuban.org> wrote:
> I'd set a user-level environment variable as well, checking that out, but it seemed a kludge at best. In a multi-user environment it'd be a hassle. For deployment to multiple machines, it'd be annoying at best.
Indeed. In that scenario I'd install directly into site-packages or
add a .pth file into site-packages. Or, like I usually do for windows
deployments, package it up with py2exe and an installer. :) (however,
as you can see, I'm firmly in CPython land... what does
'site-packages' even mean in a DotNet assembly? :)
> With respect, I'll maintain my stance of using .config files as the mechanism supported by .NET. I'd prefer unifying under that, rather than trying to grandfather in a variety of -isms from CPython. I should point out that nothing prevents IronPython from having the capability to support both -- one as standard, the other as override, if grandfather it must.
If both are needed (and your scenario below is pretty convincing) then
supporting both would work for me. I guess the principle I'm hoping
for is that for the most part a CPython person should be able to just
start using IronPythonConsole.exe (or whatever) instead of python.exe,
at least for simple apps. The only difference being that suddenly the
CLR is available.
> In fact, I think it'd make much more sense to support .config. Consider the possibility of embedding IronPython in a C# app, or an ASP.NET app, or of producing IronPython modules for use in the rest of .NET -- in any of these cases, the consuming developers are going to expect .config files rather than environment variables, and rightly so. We shouldn't have to special case the configuration mechanism, just to make it work with peers under the same runtime. Apps using the CLR use .config files, and I think IronPython should take that into consideration.
Yes indeed. I suppose there are a lot of questions there, which I
hadn't even considered. Would all of your modules be 'frozen' into the
Anyway, I've passed far beyond my experience here, so I'm going to
stop. I just wanted to make the point that people coming from CPython
are going to expect to be able to use environment variables and .pth
More information about the Ironpython-users