This project has moved and is read-only. For the latest updates, please go here.

How to automatically add referenced files in debug interactive?

Feb 16, 2014 at 10:15 PM
I have a C# background and used to the workflow and practices of Visual Studio. 'import' in Python look for me like references to different assemblies...

If I now load a main project with sample 'imports' below I do not get them automatically loaded in Python interactive
#from pylab import plot, show
#from numpy import *
from domain_analysis import *
from hurst_in_python import *
from numpy import random
import pickle
from ffn import *
from data_simulator import *
I loaded them all manually with $load, but still compile error that references are missing.

Any idea?

Note: Small suggestion on the $Load function. Can it not work to look in the projects path instead of having to give a full path+filename. A filename should do?

The interactive debugger cannot find the import functions....
Feb 18, 2014 at 4:34 PM
The Interactive window is separate state from the project, since it is often used for testing things independently of the project.

There is a dropdown on the window that shows a range of scopes. One of these will be your .py file with these imports, and changing to that should give you all of these automatically. (If not, there's always the Send to Interactive command or basic copy-paste.)

I'll file an issue to fix the load path. We currently use the Visual Studio process's current directory, which is probably going to be different from the interactive window.
Feb 18, 2014 at 4:37 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.