我正在尝试在Ubuntu的终端中运行python脚本,每次尝试时 - 解释器才会启动。
示例:
michael@michael-VirtualBox:~/Desktop/pb_cli/pb_cli$ python move_users.py --input=users.txt --username --source_account=1 --destination_account=2
Python 2.7.3 (default, Sep 26 2013, 20:08:41)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
并且move_users.py
"""Move Users.
Usage:
move_users.py --input=<input_file> (--id | --email | --username) --source_account=<source_account> --destination_account=<destination_account>
"""
from common.docopt import docopt
from common import utilities as utilities
import time
import fnmatch
import subprocess
import os
import json
import sys
if __name__ == '__main__':
#Get Arguments
arguments = docopt(__doc__, version='1.0.0rc2')
....
有什么想法吗?