close Method (Python)
.close(). Closes the cursor. You cannot use the spss.Submit function while a data cursor is open. You must close or delete the cursor first.
- This method is available in read, write, or append mode.
- When appending cases, you must call the EndChanges method before the close method.
- Cursors are implicitly closed at the end of a BEGIN PROGRAM-END PROGRAM block.
Example
cur=spss.Cursor()
data=cur.fetchall()
cur.close()