Hi everyone,
I recently started using SPSS and its Python functionality, mostly using
spss.Submit()
and parsing SPSS syntax via multiline strings as in
spss.Submit("""
echo 'Hello world.'.
""")
, which works fine when calling it from the main script. However, when calling this from within a module, say:
from pp import mm
mm.myfun()
, where mm.py
looks like
def myfun():
spss.Submit("""
echo 'Hello world.'.
""")
I get an error message, reading that "the first word in the line is not recognized as an SPSS command" (error 1, command name is blank). Am I missing something here? I also checked whether there the source of spss.py is the same in both examples, but it is... I would appreciate your help.
Best regards,
Sascha
#SPSSStatistics