Show More
@@ -31,11 +31,12 def install_editor(run_template, wait=False): | |||
|
31 | 31 | the call. |
|
32 | 32 | """ |
|
33 | 33 | |
|
34 | for substitution in ['$file', '$line']: | |
|
35 |
|
|
|
36 | raise ValueError(('run_template should contain %s' | |
|
37 | ' for string substitution. You supplied "%s"' % (substitution, | |
|
38 | run_template))) | |
|
34 | # not all editors support $line, so we'll leave out this check | |
|
35 | # for substitution in ['$file', '$line']: | |
|
36 | # if not substitution in run_template: | |
|
37 | # raise ValueError(('run_template should contain %s' | |
|
38 | # ' for string substitution. You supplied "%s"' % (substitution, | |
|
39 | # run_template))) | |
|
39 | 40 | |
|
40 | 41 | template = Template(run_template) |
|
41 | 42 | |
@@ -76,14 +77,19 def jed(exe='jed'): | |||
|
76 | 77 | install_editor(exe + ' +$line "$file"') |
|
77 | 78 | |
|
78 | 79 | |
|
79 |
def idle(exe= |
|
|
80 | def idle(exe='idle'): | |
|
80 | 81 | """ Idle, the editor bundled with python |
|
81 | 82 | |
|
82 | Should be pretty smart about finding the executable. | |
|
83 | Parameters | |
|
84 | ---------- | |
|
85 | exe : str, None | |
|
86 | If none, should be pretty smart about finding the executable. | |
|
83 | 87 | """ |
|
84 | 88 | if exe is None: |
|
85 | 89 | import idlelib |
|
86 | 90 | p = os.path.dirname(idlelib.__file__) |
|
91 | # i'm not sure if this actually works. Is this idle.py script guarenteed | |
|
92 | # to be executable? | |
|
87 | 93 | exe = os.path.join(p, 'idle.py') |
|
88 | 94 | install_editor(exe + ' "$file"') |
|
89 | 95 |
General Comments 0
You need to be logged in to leave comments.
Login now