Skip to content

Commit 6b4e730

Browse files
committed
add debug
1 parent ec18fcb commit 6b4e730

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,21 @@
1818
* [ 深入 Python :Dive Into Python 中文版](http://sebug.net/paper/books/dive-into-python/)
1919
* [crossin的编程教室](http://crossin.me/forum.php?mod=forumdisplay&fid=2)
2020
* [深入 Python 3](http://sebug.net/paper/books/dive-into-python3/)
21-
* [ython安全](http://sebug.net/paper/books/vulncat/python/)
21+
* [Python安全](http://sebug.net/paper/books/vulncat/python/)
2222

2323
### 英文资源
2424
* [dive into python](http://www.diveintopython.net/toc/index.html)
2525
* [learn python the hardway](http://learnpythonthehardway.org/book/)
26-
* [python官网教程](https://docs.python.org/2/tutorial/)
26+
* [Python官网教程](https://docs.python.org/2/tutorial/)
27+
28+
29+
# 在sublime中运行python
30+
“Preference(首选项)”-----》“Browse Packages(浏览程序包)”----------》“python”,在打开的目录中修改Python.sublime-build文件类似如下
31+
```
32+
{
33+
"cmd": ["python", "-u", "$file"],
34+
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
35+
"selector": "source.python"
36+
}
37+
```
38+
然后,Python文件就可以`ctrl/Command + b`来运行

test-debug.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/python
2+
#coding:utf-8
3+
import pdb ;
4+
a = "aaa"
5+
pdb.set_trace();# 在mac下有问题。。。
6+
b = "bbb"
7+
c = "ccc"
8+
final = a + b + c;
9+
print final

0 commit comments

Comments
 (0)