这句python语言什么意思,该怎么处理

这句python语言什么意思Python codecmd {0} -svmtrain {1} -gnuplot {2} {3}.format(grid_py, s

这句python语言什么意思

Python code
cmd = '{0} -svmtrain "{1}" -gnuplot "{2}" "{3}"'.format(grid_py, svmtrain_exe, gnuplot_exe, scaled_file)

表示还不怎么动py语法,刚看了一点,想再在里面添些参数,大神球教!

[解决办法]
Python code
>>> grid_py='a'>>> svmtrain_exe='b'>>> gnuplot_exe='c'>>> scaled_file='d'>>> cmd='{0} -svmtrain "{1}" -gnuplot "{2}" "{3}"'.format(grid_py, svmtrain_exe, gnuplot_exe, scaled_file)>>> print cmda -svmtrain "b" -gnuplot "c" "d">>> test='e'>>> cmd='{0} -svmtrain "{1}" -gnuplot "{2}" "{3}" {4}'.format(grid_py, svmtrain_exe, gnuplot_exe, scaled_file,test)>>> print cmda -svmtrain "b" -gnuplot "c" "d" e
[解决办法]
cmd = 'grid_py -svmtrain "svmtrain_exe" -gnuplot "gnuplot_exe" "scaled_file"'
你把format中的参数从0开始对应放在{0}、{1}...之中就是这句话的意思
[解决办法]
http://docs.python.org/library/string.html#formatstrings
[解决办法]
探讨

谢谢大家啦,另外问下在windows下使用哪个python IDE比较好点,像VS那样就比较爽了,不过网上还木有找到python能集成在VS2010一下版本的方法。

[解决办法]
eric+pyqt
eclipse+pydev
komodo

[解决办法]
eclipse+pydev
[解决办法]
komodo免费版