Subject: Re: sparky2csi
From: Markus Heller
Date: Mar 27, 2006

Previous: 84 Next: 88


hi andrew,

i was about to test your script, but i cant set up.

i copied the suggested lines from the header into my sparky_init.py
(attached at the end) and i keep getting the following error message
from sparky resp. python:

Traceback (most recent call last):
File
/usr/local/src/sparky/platforms/linux2.4/sparky-install/python/sparky/pythonshell.py,
line 268, in invoke_module_function
File string, line 1, in ?
File /disk400/people/markus/Sparky/Python/sparky_init.py, line 18,
in ?
session.add_command(CS, AJP/Write CSI format shift file (CS),
CS_command)
NameError: name session is not defined

unfortunately, i have no clue about python ... do you have a quick fix
for this?

thanks a lot
markus

ps: heres my sparky_init.py:

#----------------------------------------------------------------------------
# When a Sparky session starts the initilize_session() routines are
invoked
# from the following files.
#
# sparky_site.py - site initialization file
# sparky_init.py - user initialization file
#
# Typically a user has a sparky_init.py file in ~/Sparky/Python.
# If they dont then this file (which does nothing) is loaded.
#

def initialize_session(session):

def CS_command(s = session):
import csi_output
csi_output.write_csi_shifts(s)

session.add_command(CS, AJP/Write CSI format shift file (CS),
CS_command