| 1 |
# -*- coding: utf-8 -*- |
| 2 |
""" |
| 3 |
Tutorial 'Working with Spyder' |
| 4 |
============================== |
| 5 |
|
| 6 |
This script is meant to be run in Spyder. It shows how to use the DataLab remotely |
| 7 |
to help debugging a Python script running outside DataLab (e.g. in Spyder). |
| 8 |
|
| 9 |
The main idea here is to enable the debug mode in the function while running the |
| 10 |
script in Spyder, preferably with the debugger enabled, so that the script stops |
| 11 |
at the breakpoint inside the function and let us inspect the variables in both |
| 12 |
Spyder (with the Variable Explorer) and DataLab (with the visualizations). |
| 13 |
""" |
| 14 |
|
| 15 |
# ---- Begin of the example code ---- |
| 16 |
# %% Debugging my work with DataLab |
| 17 |
|
| 18 |
from my_work import generate_2d_data |
| 19 |
|
| 20 |
x, z = generate_2d_data(debug_with_datalab=True) |