diff options
Diffstat (limited to 'js/codemirror/mode/python/index.html')
-rw-r--r-- | js/codemirror/mode/python/index.html | 123 |
1 files changed, 0 insertions, 123 deletions
diff --git a/js/codemirror/mode/python/index.html b/js/codemirror/mode/python/index.html deleted file mode 100644 index 1c366438..00000000 --- a/js/codemirror/mode/python/index.html +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
1 | <!doctype html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>CodeMirror 2: Python mode</title> | ||
5 | <link rel="stylesheet" href="../../lib/codemirror.css"> | ||
6 | <script src="../../lib/codemirror.js"></script> | ||
7 | <script src="python.js"></script> | ||
8 | <link rel="stylesheet" href="../../theme/default.css"> | ||
9 | <link rel="stylesheet" href="../../css/docs.css"> | ||
10 | <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> | ||
11 | </head> | ||
12 | <body> | ||
13 | <h1>CodeMirror 2: Python mode</h1> | ||
14 | |||
15 | <div><textarea id="code" name="code"> | ||
16 | # Literals | ||
17 | 1234 | ||
18 | 0.0e101 | ||
19 | .123 | ||
20 | 0b01010011100 | ||
21 | 0o01234567 | ||
22 | 0x0987654321abcdef | ||
23 | 7 | ||
24 | 2147483647 | ||
25 | 3L | ||
26 | 79228162514264337593543950336L | ||
27 | 0x100000000L | ||
28 | 79228162514264337593543950336 | ||
29 | 0xdeadbeef | ||
30 | 3.14j | ||
31 | 10.j | ||
32 | 10j | ||
33 | .001j | ||
34 | 1e100j | ||
35 | 3.14e-10j | ||
36 | |||
37 | |||
38 | # String Literals | ||
39 | 'For\'' | ||
40 | "God\"" | ||
41 | """so loved | ||
42 | the world""" | ||
43 | '''that he gave | ||
44 | his only begotten\' ''' | ||
45 | 'that whosoever believeth \ | ||
46 | in him' | ||
47 | '' | ||
48 | |||
49 | # Identifiers | ||
50 | __a__ | ||
51 | a.b | ||
52 | a.b.c | ||
53 | |||
54 | # Operators | ||
55 | + - * / % & | ^ ~ < > | ||
56 | == != <= >= <> << >> // ** | ||
57 | and or not in is | ||
58 | |||
59 | # Delimiters | ||
60 | () [] {} , : ` = ; @ . # Note that @ and . require the proper context. | ||
61 | += -= *= /= %= &= |= ^= | ||
62 | //= >>= <<= **= | ||
63 | |||
64 | # Keywords | ||
65 | as assert break class continue def del elif else except | ||
66 | finally for from global if import lambda pass raise | ||
67 | return try while with yield | ||
68 | |||
69 | # Python 2 Keywords (otherwise Identifiers) | ||
70 | exec print | ||
71 | |||
72 | # Python 3 Keywords (otherwise Identifiers) | ||
73 | nonlocal | ||
74 | |||
75 | # Types | ||
76 | bool classmethod complex dict enumerate float frozenset int list object | ||
77 | property reversed set slice staticmethod str super tuple type | ||
78 | |||
79 | # Python 2 Types (otherwise Identifiers) | ||
80 | basestring buffer file long unicode xrange | ||
81 | |||
82 | # Python 3 Types (otherwise Identifiers) | ||
83 | bytearray bytes filter map memoryview open range zip | ||
84 | |||
85 | # Some Example code | ||
86 | import os | ||
87 | from package import ParentClass | ||
88 | |||
89 | @nonsenseDecorator | ||
90 | def doesNothing(): | ||
91 | pass | ||
92 | |||
93 | class ExampleClass(ParentClass): | ||
94 | @staticmethod | ||
95 | def example(inputStr): | ||
96 | a = list(inputStr) | ||
97 | a.reverse() | ||
98 | return ''.join(a) | ||
99 | |||
100 | def __init__(self, mixin = 'Hello'): | ||
101 | self.mixin = mixin | ||
102 | |||
103 | </textarea></div> | ||
104 | <script> | ||
105 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), { | ||
106 | mode: {name: "python", | ||
107 | version: 2, | ||
108 | singleLineStringErrors: false}, | ||
109 | lineNumbers: true, | ||
110 | indentUnit: 4, | ||
111 | tabMode: "shift", | ||
112 | matchBrackets: true | ||
113 | }); | ||
114 | </script> | ||
115 | <h2>Configuration Options:</h2> | ||
116 | <ul> | ||
117 | <li>version - 2/3 - The version of Python to recognize. Default is 2.</li> | ||
118 | <li>singleLineStringErrors - true/false - If you have a single-line string that is not terminated at the end of the line, this will show subsequent lines as errors if true, otherwise it will consider the newline as the end of the string. Default is false.</li> | ||
119 | </ul> | ||
120 | |||
121 | <p><strong>MIME types defined:</strong> <code>text/x-python</code>.</p> | ||
122 | </body> | ||
123 | </html> | ||