Tired of redefining functions in debugger, or hoping they can still be found in history? %loadfav
- executes script to load definitions, imports, or whatever. Script path set in Preferences.
Maybe it's already a thing, or it's hard to implement, but it'd indeed be a major QOL - bonus if we can specify which script to run, e.g. %loadfav(2)
.
Hi @OverLordGoldDragon , if I understand correctly, your idea is to add a custom magic that enables users to run some sort of bookmarked file (which could contain some sort of code snippet with imports or definitions - constants, functions, variables, etc), right?
What do you think @spyder-ide/core-developers ?
@dalthviz Correct.
There is an option to run a line for pdb. you can use ';' to separate line. I use:
import matplotlib.pyplot as plt; from matplotlib.pyplot import plot, imshow
If you always use the same definitions, I would:
from my_pdb_package_1 import *
/ add from my_pdb_package_1 import *
in the pdb preferences@impact27 ... why of course, _imports_.
Most helpful comment
There is an option to run a line for pdb. you can use ';' to separate line. I use:
import matplotlib.pyplot as plt; from matplotlib.pyplot import plot, imshow
If you always use the same definitions, I would:
from my_pdb_package_1 import *
/ addfrom my_pdb_package_1 import *
in the pdb preferences