小编Mic*_*ert的帖子

PYTHON 无法使用退出键退出

我在使用以下代码时遇到问题。它似乎对转义键有反应,但它冻结得非常糟糕。我在 python 2.7 和 pygame 中使用 pyscripter。

# An example implementation of the algorithm described at
# http://www.niksula.cs.hut.fi/~hkankaan/Homepages/metaballs.html
#
# The code contains some references to the document above, in form
# ### Formula (x)
# to make clear where each of the formulas is implemented (and what
# it looks like in Python)
#
# Since Python doesn't have an in-built vector type, I used complex
# numbers for coordinates (x is the real part, y is the imaginary …
Run Code Online (Sandbox Code Playgroud)

python pygame

7
推荐指数
2
解决办法
2万
查看次数

在bash中使用双重重音(反引号)的问题

我想弄清楚我需要修改哪些文件; 所以,我使用grep命令序列.我想找出哪些文件包含foo和bar.因此,我的命令是:
grep foo `grep bar * -l` | awk -F':' '{print $1}' | sort | uniq
这个命令给我一个大的列表,如下所示:
pageABC.txt
pageBCD.txt
pageDEF.txt

我希望在emacs中打开此输出.所以我通常做的是:
emacs ` whatever_was_in_my_output `
此命令通常会打开所有文件.
如果我尝试
emacs `grep foo `grep bar * -l` | awk -F':' '{print $1}' | sort | uniq `
Emacs甚至不会启动.也许是因为使用了双重坟墓口音.任何想法如何解决这个问题?

非常感谢,

d

bash shell

0
推荐指数
1
解决办法
2919
查看次数

标签 统计

bash ×1

pygame ×1

python ×1

shell ×1