Since I don't know what the interactive python mode really is, my question may be silly. But I still want to ask.
I want a python script that can initialize objects and then run the interactive python mode.
It would behave like this :
$ cat myscript.py
#!/usr/bin/env python3
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-i", action='store_true')
args = parser.parse_args()
if args.i:
foo = 'bar'
run_interactive_mode()
$ ./myscript.py -i
>>> foo
'bar'
>>>
Is there a solution for this ?