SPSS Statistics

 View Only

Calling spss.Submit() from within a module

  • 1.  Calling spss.Submit() from within a module

    Posted Wed September 23, 2020 02:55 PM
    Hi everyone,

    I recently started working with SPSS using its Python functionality, more or less only using .Submit() and parsing code as triple-quoted multiline strings as in
    spss.Submit(""" echo 'Hello world.'. """)​However, when executing this from within a module, say:
    from pp import mm​, where mm.py would include something like:
    def myfun(): ​spss.Submit(""" echo 'Hello world.'. """)​

    , running mm.myfun() gets me an error message, saying, 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 spss.py is loaded from a different source but it's the same... I would appreciate your help.

    Best regards,
    Sascha



    ------------------------------
    Sascha D, Statistician -- Germany
    ------------------------------

    #SPSSStatistics