0
votes

Canopy code editor underlines the variables that are undefined. However, once variables are loaded to the namespace by running another python script from the current script, it still does the error highlighting even though such variable exists and can be used.

Is there any way to make it see the loaded variables too?

Thanks.

1

1 Answers

1
votes

No there is not, and should not be, because as the script runs, it won't have access to those variables.

For more information, please see https://stackoverflow.com/a/26413862/1988991

You can run a script in the ipython shell namespace by using the Run magic's -i option, but this is not the normal usage, nor is it useful for testing a script which will be run independently.