Resolver Hacks contains information and code for doing fun and useful things with Resolver One. This site is created and maintained by Michael Foord, not by Resolver Systems. Please read the disclaimer before using any of the code on this site.
Spreadsheet Module Directory

Summary
Resolver One honours the IRONPYTHONPATH environment variable. You can store all your modules in a single directory, and so long as that directory is pointed to by the IRONPYTHONPATH environment variable then your spreadsheets will be able to import them.
By default Resolver One will import Python modules from the same directory as a spreadsheet. As you develop a library of useful functions and classes that you use throughout your spreadsheets, it becomes a nuisance to have to keep all your modules with every spreadsheet. What would be nice is to be able to specify a single directory that Resolver One will look for modules when you execute an import. You could add the following incantation to the start of your user code, but it would be nicer if you didn't have to:
my_dir = r'C:\SomeDirectory'
if not my_dir in sys.path:
sys.path.append(my_dir)
It won't be long before Resolver One provides a user interface for adding directories to the import search path, but in the meantime we can take advantage of a little known feature to achieve the same effect. Resolver One is an IronPython application, and executes user code in an IronPython engine. The IronPython engine allows you to specify additional paths for the module search path in an environment variable IRONPYTHONPATH.
Setting environment variables is straightforward, but if you haven't done it before then it is explained in the article Hints for Windows Command Line Programming. As the summary says, if you setup the the IRONPYTHONPATH environment variable to point to a directory (or several directories separated by semi-colons) then you can store your spreadsheet modules in that directory and still import them into your spreadsheets.
Another way of achieving the same effect is to use the Resolverforge module. So long as they import Resolverforge, your Resolverforge directory will be on the import path for your spreadsheets.
Last edited Sun Feb 10 00:58:19 2008.

IronPython in Action