gpt4 book ai didi

sublimetext3 - sublime text 3 包控件安装

转载 作者:行者123 更新时间:2023-12-01 07:06:30 29 4
gpt4 key购买 nike

我在安装sublime text 3的包控件的时候因为代理设置的问题,但是我需要安装一个插件。当我这样做时 getproxy在控制台中它返回我 {} 并且当我尝试在控制台中使用 python 设置代理时
urllib.set_proxy('http://user:password@server:port', 'http')
我用它们的值替换了用户、密码、服务器和端口,但它返回了我

Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'set_proxy'

我该怎么做才能让它发挥作用?我需要安装一个插件。

最佳答案

设置包控制以在代理服务器后面工作

您需要在 Package Control 中设置您的代理服务器。设置。

将下面的代码复制并粘贴到名为 Package Control.sublime-settings 的文件中必须保存在您的 User 中配置文件夹。这是与您的 相同的文件夹用户 Preferences.sublime-settings文件保存在。The Data Directory说明它在您的操作系统上的位置。 IE。

  • window :%APPDATA%\Sublime Text 3\Packages\User\Package Control.sublime-settings
  • OS X:~/Library/Application Support/Sublime Text 3/Packages/User/Package Control.sublime-settings
  • Linux:~/.config/sublime-text-3/Packages/User/Package Control.sublime-settings

  • 显然,您必须在下面的相关字段中添加域和端口以及您的用户名和密码。代理应采用以下形式: proxyserver:port .例如
    {
    "http_proxy": "server.com:80",
    "https_proxy": "server.com:8080",
    "proxy_username": "mynameis",
    "proxy_password": "mypassis",
    }

    另见: Package Control Settings
    {
    // An HTTP proxy server to use for requests. Not normally used on Windows
    // since the system proxy configuration is utilized via WinINet. However,
    // if WinINet is not working properly, this will be used by the Urllib
    // downloader, which acts as a fallback.
    "http_proxy": "",

    // An HTTPS proxy server to use for requests - this will inherit from
    // http_proxy if it is set to "" or null and http_proxy has a value. You
    // can set this to false to prevent inheriting from http_proxy. Not
    // normally used on Windows since the system proxy configuration is
    // utilized via WinINet. However, if WinINet is not working properly, this
    // will be used by the Urllib downloader, which acts as a fallback.
    "https_proxy": "",

    // Username and password for both http_proxy and https_proxy. May be used
    // with WinINet to set credentials for system-level proxy config.
    "proxy_username": "",
    "proxy_password": "",
    }

    关于sublimetext3 - sublime text 3 包控件安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43476308/

    29 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com