py: Improve GC locking/unlocking, and make it part of the API.
py: Continue line if last character is backslash.