You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: v3/docs/user-FAQ.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,17 @@
3
3
Email philip@pgbovine.net if you have a question that isn't addressed here.
4
4
5
5
6
-
#### I thought all objects in Python are (conceptually) on the heap; why does Online Python Tutor render primitive values (e.g., numbers, strings) inside of stack frames?
6
+
#### I thought all objects in Python are (conceptually) on the heap; why does Python Tutor render primitive values (e.g., numbers, strings) inside of stack frames?
7
7
8
8
This was a design decision made to keep the display less cluttered;
9
9
if we were truly faithful to Python's semantics, that would result in far too many arrows (pointers) being drawn.
10
10
However, note that since primitives are **immutable** and thus behave identically regardless of aliasing,
11
11
it doesn't matter whether they're rendered in the stack or heap.
12
12
13
-
Update on 2013-01-06: I've just added a drop-down menu option with two choices:
13
+
Update on 2013-01-06: I'veadded a drop-down menu option with two choices:
14
14
"inline primitives and nested objects" versus "render all objects on the heap".
15
15
If you want to render all objects on the heap, select the latter option.
16
-
To avoid too many arrows being drawn, also toggle the "draw references using arrows" option
16
+
To avoid too many arrows being drawn, also toggle the default "draw references using arrows" option
17
17
to "use text labels for references".
18
18
19
19
@@ -35,3 +35,21 @@ The possibilities are endless! (or 2^6 or something.)
35
35
#### Did you know that stepping through code with generators looks weird when "display frames of exited functions" is selected?
36
36
37
37
Yep, this is a known bug, but sadly the fix isn't straightforward at the moment.
38
+
39
+
40
+
#### Can I run my own version offline without Internet access?
41
+
42
+
Yes, if you care about only Python. See the directions in [Overview for Developers](developer-overview.md#getting-started-running-opt-locally-on-your-machine-using-bottle). Unfortunately, this is much harder to do for other languages, since they use backends that are in v4-cokapi/ that communicate with the visualizer in more complex ways.
43
+
44
+
45
+
#### Why am I getting a server error or unknown error?
46
+
47
+
Hard to say :/ But here are some possible reasons:
48
+
49
+
- Your script is too big, size-wise (bigger than ~4,000 bytes or so). Python Tutor isn't meant to debug giant pieces of code. Shorten your code to visualize only the snippet you really care about.
50
+
- Your code might have certain non-ASCII characters that trip up the server. Basic Unicode support works, but I am not an internationalization expert, so some weird things may happen when coding in non-English languages.
51
+
- Out of memory: if your code allocates a lot of memory very quickly (e.g., `x**x`)
52
+
- Infinite loops (although that should usually result in a better error message)
53
+
- Python input() and raw_input() support may not be the most robust
0 commit comments