擅长:python、mysql、java
<p>下面的示例代码在Emacs buffer和python模式下,<kbd>C-C</kbd><kbd>C-C</kbd>应该在python3shell缓冲区中打印一行以chars“1.2”开头的行,因为文本中有这样一行。在</p>
<pre><code>#! /usr/bin/env python3
import re
DATEI="My-path-to-bible.txt"
SATZ = re.compile('^1.2')
with open(DATEI, "r") as jetzt:
for line in jetzt:
k = SATZ.match(line)
if k:
print(line)
</code></pre>
<p>Python-模式.el附带一个选项<code>py-store-result-p</code>:当<code>t</code>时,结果在kill ring中,准备好被猛拉。在</p>
<p><a href="https://gitlab.com/python-mode-devs/python-mode" rel="nofollow noreferrer">https://gitlab.com/python-mode-devs/python-mode</a></p>