
python
文章平均质量分 71
timidsmile
我若不坚强,软弱给谁看????
展开
-
title && tile
1. 字符串的内置函数 title() 可以把每个单词的第一个字符变成大写 2. 而 title 函数 >>> tile([2], [3, 2]) array([[2, 2], [2, 2], [2, 2]]) >>> tile([0, 0], 5) array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) >>> tile([0, 0],原创 2013-11-26 15:54:38 · 1875 阅读 · 0 评论 -
linux 下 学写 python
python 调用 linux shell 的方法 http://demi-panda.com/2013/01/25/python-shell-command/index.html 1 #!/usr/bin/env python import subprocess class RunCmd(object): def cmd_run(self,cmd): sel原创 2014-10-15 22:40:46 · 15043 阅读 · 2 评论 -
笔记:python 调用 shell 和 C
python 调用 C : 还是shell 获得linux 相关比较简单。 目前发现cmd好用。但是不适合很长的shell命令。只能写在脚本哩。。。[最好用的方法应该是??? pythhon 调用C 的时候,向C传递的参数=======发现直接传int不对。。。字符串接收是可以的。 C++ 编译为so 供 python调用,命令: g++ perm.cpp -fPIC原创 2015-04-04 13:30:51 · 1235 阅读 · 0 评论