ptpython errors with pickle from shell
I experienced errors probably due to ptpython2:
In this example I am trying to pickle an object from inside the bliss shell
BLISS [1]: import pickle
BLISS [1]: def f():
...: return None
BLISS [1]: pickle.dumps(f)
Traceback (most recent call last):
File "/home/ppancino/bliss3/bliss/shell/cli/repl.py", line 260, in embed
cmd_line_i._execute(inp)
File "/home/ppancino/bliss3/bliss/shell/cli/repl.py", line 79, in _execute
raise return_value[1].with_traceback(return_value[2])
File "/home/ppancino/bliss3/bliss/shell/cli/repl.py", line 66, in _execute_task
return super(BlissRepl, self)._execute(*args, **kwargs)
File "/home/ppancino/miniconda3/envs/bliss3/lib/python3.7/site-packages/ptpython/repl.py", line 124, in _execute
result = eval(code, self.get_globals(), self.get_locals())
File "<stdin>", line 1, in <module>
_pickle.PicklingError: Can't pickle <function f at 0x7fb2d1b35d08>: attribute lookup f on __main__ failed