[IronPython] Saving sys.path

Martin Maly martmaly at exchange.microsoft.com
Wed Apr 27 19:20:53 CEST 2005


There are, as far as I can see, three different ways to help in this
case and I am looking into implementing all of them very soon,
definitely for the next release.

 

CPython uses environment variables PYTHONSTARTUP and PYTHONPATH to drive
the initialization of the interpreter

Also, on initialization, the interpreter executes statement "import
site" which is the third way to hook into the initialization process.

 

As for the environment variables go, there is a question of naming. One
possibility is to use the well-known names (PYTHONSTARTUP, PYTHONPATH)
and another is to use our own: IRONPYTHONSTARTUP and IRONPYTHONPATH. We
prefer the latter (names prefixed with IRON) to avoid conflicts for
those of us who use CPython and IronPython on the same machine.

 

Unless there is strong reason to use the standard names, we will go
forward with the IRONPYTHON... ones.

 

If you feel one way or another, please let us know. For the purpose of
the environment variable naming, we are not considering other naming
schemes so the choice is either standard names, or IRONPYTHON* ones.

 

Keith, I think this should provide you with the tools you need for your
work, correct? We will try to get this update out even sooner than
usual. 

 

Martin

 

________________________________

From: users-ironpython.com-bounces at lists.ironpython.com
[mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of
Keith J. Farmer
Sent: Tuesday, April 26, 2005 4:02 PM
To: Discussion of IronPython
Subject: RE: [IronPython] Saving sys.path

 

Perhaps (to at least keep the .NET way) a .config file instead of an
environment variable?

 

That file *could* specify one or more startup files, to maintain the
Python mystique.

 

________________________________

From: users-ironpython.com-bounces at lists.ironpython.com on behalf of
Michael Spencer
Sent: Tue 4/26/2005 3:52 PM
To: users-ironpython.com at lists.ironpython.com
Subject: [IronPython] Saving sys.path

Second feature request of the week:

I would like to save sys.path settings between interpreter sessions.

Is there a way to do this today?

If not, could there be an OS environment variable for this or, a
startup.py file
loaded each time the interpreter starts?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20050427/9ba4eba7/attachment.html>


More information about the Ironpython-users mailing list