Document Designer - instructions > Design-time scripting > Editing the configuration file

Editing the configuration file
The file is located in the following folder:
<StreamServe installation>\Services\StoryTeller\<version>\bin
Depending on how you start StoryTeller, edit the following files:
Stand-alone – the StoryTeller.exe.config file.
Via Design Center – the StoryTellerStarter.exe.config file.
To configure a custom command
1
<setting name="ScriptPython_CustomCommand_0" serializeAs="String">
2
Within the value tag, add the module and function you want to invoke when running the custom Python command. For example:
<value>mymodule.myfunction()</value>
To automatically load libraries
1
<setting name="ScriptPython_OnStartCommand" serializeAs="String">
2
Within the value tag, add the python library files you want to import with the following syntax
import <modulefile> (requires that you call the methods in the file with <modulefile>.<method>)
from <modulefile> import * (lets you access the module methods directly)
You can import several modules using semicolon (;) as separator.
You can also use the execfile <execfile> command as the value where <execfile> is a Python script containing the import commands.
For more information on Python syntax, see the Python reference.
Example 21
<setting name="ScriptPython_OnStartCommand" serializeAs="String">
<value>import trigmethodslib;from colorslib import *</value>
</setting>
 
To edit the import path of python modules
1
<setting name="ScriptPython_ImportPath" serializeAs="String">
2
Within the value tag, edit the path relative to the \bin folder to where you store your Python modules that you want to import. By default it is:
<value>../py</value>
 
*
In the Python Script panel, you can browse through the previously issued commands using Ctrl key + the up and down arrow keys.
OpenText StreamServe 5.6 Updated: 2013-03-01