sublime text 3如何配置自己的build-system,在命令行中运行python【转载】

原文出处:http://ju.outofmemory.cn/entry/200815
我假设你已经装过python ,并且已经将python路径添加进了环境变量

那么你只需在【工具】–【编译系统】–【新编译系统】或者你的Sublime Text Build 3083 x64\Data\Packages\User路径下新建一个Python_cmd.sublime-build,内容如下:

{
“encoding”: “utf-8”,
“working_dir”: “KaTeX parse error: Can't use function '\"' in math mode at position 38: …d": "python -u \̲"̲file”",
“file_regex”: “1File "(…?)”, line ([0-9]*)",
“selector”: “source.python”,

"variants":
[
	{
		"name": "Run",
		"shell_cmd": "start cmd /c \"python -u \"$file\" & pause\"",
	}
]

}
然后将编译系统切换到Python_cmd,就可以在命令行中运行python程序了,失败的请检查系统环境变量。

sublime text 3如何配置自己的build-system,在命令行中运行python 1

顺便附上一篇讲解build-system文件的文章

http://sublime-text.readthedocs.org/en/latest/reference/build_systems.html

里面有讲解编译系统设置临时环境变量的办法,那么我们可以做一个纯绿色的python开发环境包:

首先,安装python时选择install just for me 。它会把相关依赖都安装在python安装路径下

sublime text 3如何配置自己的build-system,在命令行中运行python 2

然后便携版的sublime解压在安装python的上一级文件夹里

然后参考链接里path的用法,把python的路径加进去。

这两个直接一起打包装进U盘,走到哪里用到哪里。


  1. ↩︎

因为网络原因下载极慢。windows64版本在此分享~ 今天发布的3124, Release Date: 22 September 2016 See also the Blog Post Settings now open in a new window, with the default and user settings side-by-side Hovering over a symbol will show a popup indicating where it's defined. This is controlled with the show_definitions setting. Build errors are now shown inline at the location where they occurred. This is controlled with the show_errors_inline setting. Added a menu item and command palette entry to install Package Control Various syntax highlighting improvements Significant improvements to the Scala syntax definition, with thanks to djspiewak and gwenzek Significant improvements to the LaTeX syntax definition, with thanks to randy3k Improved Goto Definition performance when a large number of files are open Minor improvements to file load times Linux and OSX: Improved memory usage Fixed Replace not working as expected in conjunction with regex look behinds Fixed build systems being unable to use "file_patterns" with the exec command Corrected tab overlap on HiDPI Windows and Linux configurations OSX: Fixed a graphical glitch when switching tabs OSX: Fixed crash when entering a surrogate pair via hex input Linux: Improved rendering performance for some systems File encoding of open files is now stored in the session Build Systems may define a cancel command using the "cancel" key Syntax: Added clear_scopes directive, to give more control over the generated scopes Color Schemes: Added popupCss key, for defining default popup style sheets Color Schemes: Added phantomCss key, for defining default phantom style sheets minihtml: HiDPI support was added for Windows and Linux minihtml: Windows style line endings and single quoted attributes are now supported minihtml: Child selectors may now be used in style sheets minihtml: The inherit CSS value has been implemented minihtml: font-family stacks may now be used minihtml: Support for the line-height CSS property was added minihtml: Elements may now be relatively positioned minihtml: Inline elements support padding and background-color set minihtml: CSS variables and the var() function are now supported minihtml: Added the CSS color functions color() (partial), rgb(), rgba(), hsl() and hsla() minihtml: Fixed a stack overflow on Windows with too many unclosed tags API: Added Phantom and PhantomSet API: Added ViewEventListener API: Added View.is_primary() API: Added EventListener.on_hover(view, point, hover_zone) API: Added functions to get and set visibility of the minimap, status bar, tabs and menu API: Modifications to a selection are now constrained to the valid range API: Updated Python 3.3 to commit 8e3b9bf917a7, and SQLite to 3.14.1 Packages: Loading packages will no longer abort if a .sublime-package is corrupt Packages: Fixed an edge case when loading third party packages from unicode paths on Windows
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值