First time here? Check out the FAQ!
1

Workspace similar to MATLAB and Spyder

  • retag add tags

Is there a workspace similar to MATLAB that can list the variables in Wing Pro? In MATLAB or Spyder, once execute a script, the variable created by the script will be listed in the workspace. These variables can be called by another new script without being defined in the new script. For example, in Spyder, after execute A.py there are x = 1.0, y = 2.0, z = 3.0 in the workspace. Now, we can run B.py calling x, y, z with the values shown in workspace even though x, y, z are not specified in B.py. Is it possible to do this in Wing Pro?

anonymous user
Anonymous
asked 2019-09-15 20:53:18 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

You can use Evaluate File in Python Shell to evaluate the file and the Python Shell will retain the state from the previous file as you describe above, as long as the Auto-Restart When Evaluate File option in its Options menu is disabled. Evaluate Selecting in Python Shell works similarly.

A similar option is to debug something, and use the Debug Probe at a breakpoint. It is a Python Shell that uses the runtime context of the current stack frame in the debugger.

With both you can select a range of lines in the editor and press the =+ icon in the top right of the Python Shell or Debug Probe to define an active range in the editor that you can reevaluate in the shell it's locked into by pressing the cog icon that will appear in the top right of the shell. This makes it easier to retry code as you're working on it.

The docs for this are at https://wingware.com/doc/debug/python... and https://wingware.com/doc/debug/debug-...

Wingware Support's avatar
4k
Wingware Support
answered 2019-09-16 08:10:16 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer