Google App Engine在编辑器中设置

时间:2016-03-29 15:09:35

标签: python-2.7 google-app-engine editor visual-studio-code

使用Google App Engine for Python时,如何正确设置编辑器以充分利用它?

在Visual Studio代码中,我有以下用户设置:

// Place your settings in this file to overwrite the default settings
{
    "python.pythonPath": "c:/python27/python.exe",

    "python.autoComplete.extraPaths": [
        "C:/Program Files (x86)/Google/google_appengine",
        "C:/Program Files (x86)/Google/google_appengine/lib" ]
}

但是我在编码时似乎没有获得webapp2的自动完成功能。

有关如何正确设置的任何建议吗?

1 个答案:

答案 0 :(得分:0)

您需要添加google_appengine / lib中的所有文件夹。对于MAC用户,

  "python.autoComplete.extraPaths": [
    "/usr/local/google_appengine",
    "/usr/local/google_appengine/lib",
    "/usr/local/google_appengine/lib/PyAMF-0.6.1",
    "/usr/local/google_appengine/lib/PyAMF-0.7.2",
    "/usr/local/google_appengine/lib/antlr3",
    "/usr/local/google_appengine/lib/apiclient",
    "/usr/local/google_appengine/lib/argparse",
    "/usr/local/google_appengine/lib/cacerts",
    "/usr/local/google_appengine/lib/cherrypy",
    "/usr/local/google_appengine/lib/concurrent",
    "/usr/local/google_appengine/lib/deprecated_enum",
    "/usr/local/google_appengine/lib/distutils",
    "/usr/local/google_appengine/lib/django-0.96",
    "/usr/local/google_appengine/lib/django-1.2",
    "/usr/local/google_appengine/lib/django-1.3",
    "/usr/local/google_appengine/lib/django-1.4",
    "/usr/local/google_appengine/lib/django-1.5",
    "/usr/local/google_appengine/lib/docker",
    "/usr/local/google_appengine/lib/endpoints-1.0",
    "/usr/local/google_appengine/lib/fancy_urllib",
    "/usr/local/google_appengine/lib/google-api-python-client",
    "/usr/local/google_appengine/lib/graphy",
    "/usr/local/google_appengine/lib/grizzled",
    "/usr/local/google_appengine/lib/httplib2",
    "/usr/local/google_appengine/lib/ipaddr",
    "/usr/local/google_appengine/lib/jinja2-2.6",
    "/usr/local/google_appengine/lib/markupsafe-0.15",
    "/usr/local/google_appengine/lib/mox",
    "/usr/local/google_appengine/lib/oauth2",
    "/usr/local/google_appengine/lib/oauth2client",
    "/usr/local/google_appengine/lib/portpicker",
    "/usr/local/google_appengine/lib/prettytable",
    "/usr/local/google_appengine/lib/protorpc-1.0",
    "/usr/local/google_appengine/lib/pyasn1",
    "/usr/local/google_appengine/lib/pyasn1_modules",
    "/usr/local/google_appengine/lib/python-gflags",
    "/usr/local/google_appengine/lib/requests",
    "/usr/local/google_appengine/lib/rsa",
    "/usr/local/google_appengine/lib/setuptools-0.6c11",
    "/usr/local/google_appengine/lib/simplejson",
    "/usr/local/google_appengine/lib/six",
    "/usr/local/google_appengine/lib/sqlcmd",
    "/usr/local/google_appengine/lib/uritemplate",
    "/usr/local/google_appengine/lib/webapp2-2.3",
    "/usr/local/google_appengine/lib/webapp2-2.5.1",
    "/usr/local/google_appengine/lib/webapp2-2.5.2",
    "/usr/local/google_appengine/lib/webob-1.1.1",
    "/usr/local/google_appengine/lib/webob-1.2.3",
    "/usr/local/google_appengine/lib/webob_0_9",
    "/usr/local/google_appengine/lib/websocket",
    "/usr/local/google_appengine/lib/yaml",
    "/usr/local/google_appengine/lib/yaml-3.10"
],