首页 > 代码库 > python中的numpy
python中的numpy
1. 下载readline模块
http://newcenturycomputers.net/projects/readline.html
2. install readlinemodule
3. edit and configure pythonstartup file%USERPROFILE%中,这是个系统变量,路径是c:\user\用户名\
# python startup file
import sys
import readline
import rlcompleter
import atexit
import os
# tab completion
readline.parse_and_bind(‘tab: complete‘)
# history file
histfile = os.path.join(os.environ[‘HOME‘], ‘.pythonhistory‘)
try:
readline.read_history_file(histfile)
except IOError:
pass
atexit.register(readline.write_history_file, histfile)
del os, histfile, readline, rlcompleter
import sys
import readline
import rlcompleter
import atexit
import os
# tab completion
readline.parse_and_bind(‘tab: complete‘)
# history file
histfile = os.path.join(os.environ[‘HOME‘], ‘.pythonhistory‘)
try:
readline.read_history_file(histfile)
except IOError:
pass
atexit.register(readline.write_history_file, histfile)
del os, histfile, readline, rlcompleter
4. add the enviroment varable to system with administrator role
For windowns
pythonstartupf=path/pythonstartup.py
将.startup.py放到%USERPROFILE%
添加环境变量PYTHONSTARTUP,
值为%USERPROFILE%\.startup.py
For Linux
add the following to you~/.bash_profile
export PYTHONSTARTUP=~/.pythonstartup
python中的numpy
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。