The second was my incomplete attempt at wrapping sbatch. The function will return the jobid of the job it creates. Here are some examples:
>>> pyslurm.job().submit_batch_job({'script': 'batch.sh'})
3
>>> pyslurm.job().submit_batch_job({'wrap': 'sleep 700'})
4
I'll have to check again, but I think at the moment, it won't process #SBATCH directives in a shell script, but in the same job_opts dictionary, you can pass it the same options you would in #SBATCH.
Giovanni