Is there a way to access variables in the current python kernel from within a %%bash or other %%script cell?
%%bash
%%script
Perhaps as command line argume
Just to note a variation, if you need to pass something other than a simple variable to the bash script:
%%bash -s $dict['key1'] $dict['key2'] $dict['key3']
goes gruesomely wrong, but
%%bash -s {dict['key1']} {dict['key2']} {dict['key3']}
works nicely.