|
6 | 6 | # extensions [ py ] |
7 | 7 | # O> py:setup "foobarbaz" => ERROR Extension exception: Couldn't find Python executable: foobarbaz |
8 | 8 |
|
9 | | -open-connection-python2 |
10 | | - extensions [ py ] |
11 | | - O> py:setup py:python2 |
12 | | - O> py:run "print('python hi1!')" |
13 | | - O> py:run "print('python hi2!')" |
14 | | - |
15 | | -python2-gets-python-2 |
16 | | - extensions [ py ] |
17 | | - O> py:setup py:python2 |
18 | | - O> py:run "import sys" |
19 | | - py:runresult "sys.version_info[0]" => 2 |
20 | | - |
21 | | -basic-python-types-convert-python2 |
22 | | - extensions [ py ] |
23 | | - O> py:setup py:python2 |
24 | | - py:runresult "1" => 1 |
25 | | - py:runresult "'hi'" => "hi" |
26 | | - py:runresult "True" => true |
27 | | - py:runresult "False" => false |
28 | | - py:runresult "[1, 'hi', [2, 'bye']]" => [1 "hi" [2 "bye"]] |
29 | | - |
30 | | -basic-netlogo-types-convert-python2 |
31 | | - extensions [ py ] |
32 | | - O> py:setup py:python2 |
33 | | - O> py:set "num" 1 |
34 | | - O> py:set "string" "hi" |
35 | | - O> py:set "lst" [1 "hi" [2 "bye"]] |
36 | | - O> py:set "b" true |
37 | | - py:runresult "num" => 1 |
38 | | - py:runresult "string" => "hi" |
39 | | - py:runresult "lst" => [1 "hi" [2 "bye"]] |
40 | | - py:runresult "b" => true |
41 | | - |
42 | | -error-handling-python2 |
43 | | - extensions [ py ] |
44 | | - O> py:setup py:python2 |
45 | | - O> py:run "raise Exception('hi')" => ERROR Extension exception: hi |
46 | | - py:runresult "1 / 0" => ERROR Extension exception: integer division or modulo by zero |
47 | | - |
48 | | -dicts-convert-to-lists-python2 |
49 | | - extensions [ py ] |
50 | | - O> py:setup py:python2 |
51 | | - py:runresult "{'a': 1}" => [["a" 1]] |
52 | | - |
53 | | -sets-convert-to-lists-python2 |
54 | | - extensions [ py ] |
55 | | - O> py:setup py:python2 |
56 | | - py:runresult "{1, 1}" => [1] |
57 | | - |
58 | | -np-array-convert-to-lists-python2 |
59 | | - extensions [ py ] |
60 | | - O> py:setup py:python2 |
61 | | - O> py:run "import numpy as np" |
62 | | - py:runresult "np.array([1,2,3])" => [1 2 3] |
63 | | - |
64 | | -supports-utf8-python2 |
65 | | - extensions [ py ] |
66 | | - O> py:setup py:python2 |
67 | | - py:runresult "'😃'" => "😃" |
68 | | - |
69 | | -errors-on-nan-python2 |
70 | | - extensions [ py ] |
71 | | - O> py:setup py:python2 |
72 | | - py:runresult "float('nan')" => ERROR Extension exception: Python reported a non-numeric value from a mathematical operation. |
73 | | - |
74 | | -errors-on-infinity-python2 |
75 | | - extensions [ py ] |
76 | | - O> py:setup py:python2 |
77 | | - py:runresult "float('inf')" => ERROR Extension exception: Python reported a number too large for NetLogo. |
| 9 | +# open-connection-python2 |
| 10 | +# extensions [ py ] |
| 11 | +# O> py:setup py:python2 |
| 12 | +# O> py:run "print('python hi1!')" |
| 13 | +# O> py:run "print('python hi2!')" |
| 14 | +# |
| 15 | +# python2-gets-python-2 |
| 16 | +# extensions [ py ] |
| 17 | +# O> py:setup py:python2 |
| 18 | +# O> py:run "import sys" |
| 19 | +# py:runresult "sys.version_info[0]" => 2 |
| 20 | +# |
| 21 | +# basic-python-types-convert-python2 |
| 22 | +# extensions [ py ] |
| 23 | +# O> py:setup py:python2 |
| 24 | +# py:runresult "1" => 1 |
| 25 | +# py:runresult "'hi'" => "hi" |
| 26 | +# py:runresult "True" => true |
| 27 | +# py:runresult "False" => false |
| 28 | +# py:runresult "[1, 'hi', [2, 'bye']]" => [1 "hi" [2 "bye"]] |
| 29 | +# |
| 30 | +# basic-netlogo-types-convert-python2 |
| 31 | +# extensions [ py ] |
| 32 | +# O> py:setup py:python2 |
| 33 | +# O> py:set "num" 1 |
| 34 | +# O> py:set "string" "hi" |
| 35 | +# O> py:set "lst" [1 "hi" [2 "bye"]] |
| 36 | +# O> py:set "b" true |
| 37 | +# py:runresult "num" => 1 |
| 38 | +# py:runresult "string" => "hi" |
| 39 | +# py:runresult "lst" => [1 "hi" [2 "bye"]] |
| 40 | +# py:runresult "b" => true |
| 41 | +# |
| 42 | +# error-handling-python2 |
| 43 | +# extensions [ py ] |
| 44 | +# O> py:setup py:python2 |
| 45 | +# O> py:run "raise Exception('hi')" => ERROR Extension exception: hi |
| 46 | +# py:runresult "1 / 0" => ERROR Extension exception: integer division or modulo by zero |
| 47 | +# |
| 48 | +# dicts-convert-to-lists-python2 |
| 49 | +# extensions [ py ] |
| 50 | +# O> py:setup py:python2 |
| 51 | +# py:runresult "{'a': 1}" => [["a" 1]] |
| 52 | +# |
| 53 | +# sets-convert-to-lists-python2 |
| 54 | +# extensions [ py ] |
| 55 | +# O> py:setup py:python2 |
| 56 | +# py:runresult "{1, 1}" => [1] |
| 57 | +# |
| 58 | +# np-array-convert-to-lists-python2 |
| 59 | +# extensions [ py ] |
| 60 | +# O> py:setup py:python2 |
| 61 | +# O> py:run "import numpy as np" |
| 62 | +# py:runresult "np.array([1,2,3])" => [1 2 3] |
| 63 | +# |
| 64 | +# supports-utf8-python2 |
| 65 | +# extensions [ py ] |
| 66 | +# O> py:setup py:python2 |
| 67 | +# py:runresult "'😃'" => "😃" |
| 68 | +# |
| 69 | +# errors-on-nan-python2 |
| 70 | +# extensions [ py ] |
| 71 | +# O> py:setup py:python2 |
| 72 | +# py:runresult "float('nan')" => ERROR Extension exception: Python reported a non-numeric value from a mathematical operation. |
| 73 | +# |
| 74 | +# errors-on-infinity-python2 |
| 75 | +# extensions [ py ] |
| 76 | +# O> py:setup py:python2 |
| 77 | +# py:runresult "float('inf')" => ERROR Extension exception: Python reported a number too large for NetLogo. |
78 | 78 |
|
79 | 79 | open-connection-python3 |
80 | 80 | extensions [ py ] |
|
0 commit comments