zoukankan      html  css  js  c++  java
  • sublime text3 下配置python3!

    1.下载sublime3和python3(在腾讯软件中心下载较快)

    2.安装

    3.打开sublime ,tools->build system->new build system,在文件中写入:

    {
    	"encoding": "utf-8",
    	"working_dir": "$file_path",
    	"shell_cmd": "C:\python36\python.exe -u "$file"",
    	"file_regex": "^[ ]*File "(...*?)", line ([0-9]*)",
    	"selector": "source.python"
    }
    

      shell_cmd是python的安装路径,注意按照格式来,然后ctrl+s,保存文件,去取名为python3.6

    4.点击build system 可以看到python3.6,选择它,然后新建一个文件,ctrl+s把文件命名为hello.py,在文件输入代码:

    print('hello world!')
    

      然后ctrl+b运行,正常运行,至此第一步大功告成!

    5.但是这样的是没有交互功能的,比如出现提示输入,然后键盘输入一个数,目前这个配置是无法做到的,我们要安装一个插件

    6.选择tools->install package control,等待安装成功

    7.在pereference可以看到package control,然后点击package control,在搜索框输入install package

    8.可能出现问题:https://www.jianshu.com/p/ceb68e69f1ad

    9.搜索sublimeREPL

    10.key blindings绑定F5

    {
    "keys":["f5"],
    "caption": "SublimeREPL: Python - RUN current file",
    "command": "run_existing_window_command", "args": {"id": "repl_python_run",
    "file": "config/Python/Main.sublime-menu"}
    }
    

    11.代码补全插件:sublimecodeINTEL

  • 相关阅读:
    Json:前台对象数组传到后台解析
    const和static readonly 区别
    C#中Abstract和Virtual
    浅谈算法和数据结构: 一 栈和队列
    谈谈数据库的ACID
    C#面试:委托
    哈希表
    平衡查找树之红黑树
    机器学习/深度学习 问题总结及解答
    2018Java研发实习内推
  • 原文地址:https://www.cnblogs.com/findlisa/p/10258326.html
Copyright © 2011-2022 走看看