我肩负着类似的任务:
@task
def cli():
command = [
os.path.join(env.servers_path, "bin", "redis-cli"),
]
run(" ".join(command))
发言给我带来了迅速但又没有互动:
$ fab cli
[server] Executing task cli
[server] Executing task redis.cli
[server] run: /path/to/bin/redis-cli
[server] out: redis 127.0.0.1:6379> help
<no output produced>
打字进一步产生“排外:”促使我身边,但我根本不能再重新处理。
然而,如果我转向其他一些互动的迅速行动,我确实有互动性:
@task
def cli():
command = [
"python"
]
run(" ".join(command))
生产:
$ fab cli
[server] Executing task cli
[server] run: python
[server] out: Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[server] out: [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
[server] out: Type "help", "copyright", "credits" or "license" for more information.
[server] out: >>> a = 1
[server] out: >>> a
[server] out: 1
[server] out: >>>
谁能向我提出任何背心,说明为什么再三行事? 我愿向该项目开一个灯塔,但我首先要更好地了解该项目。