| 查看: 598 | 回复: 1 | ||
wangrj2010金虫 (著名写手)
|
[求助]
python文件中,函数路径设置问题 已有1人参与
|
|
本人没接触过python,在网上下载了matlab的一个工具箱libsvm-3.20,工具箱中有一个文件是grid.py,该文件需要调用工具箱中的另外一个函数svmtrain.exe和画图软件gnuplot中的gnuplot.exe,在该python文件中需要自己修改函数的路径,源代码是 # example for windows self.svmtrain_pathname = os.path.join(dirname, r'..\windows\svm-train.exe') # svmtrain_pathname = r'c:\Program Files\libsvm\windows\svm-train.exe' self.gnuplot_pathname = r'c:\tmp\gnuplot\binary\pgnuplot.exe' 那么问题是 修改路径是在r'后边直接修改?等号左边的self.svmtrain_pathname、self.gnuplot_pathname 和等号右边的os.path.join需要修改吗? 之所以提出这样的问题,是因为在网上搜过,大家基本上说的都是修改为以下类似的形式 svmtrain_exe = r"D:\libSVM\program\svm-train.exe" gnuplot_exe = r"D:\libSVM\gnuplot\pgnuplot.exe" 附:安装的是python2.7,gnuplot5.0,matlab r2013a 谢谢! |
» 猜你喜欢
284求调剂
已经有10人回复
一志愿山东大学药学学硕求调剂
已经有4人回复
07化学280分求调剂
已经有4人回复
298-一志愿中国农业大学-求调剂
已经有12人回复
求材料,环境专业调剂
已经有3人回复
335求调剂
已经有5人回复
求调剂
已经有7人回复
一志愿吉大化学322求调剂
已经有4人回复
环境学硕288求调剂
已经有8人回复
341求调剂(一志愿湖南大学070300)
已经有6人回复
2楼2016-04-19 13:29:39













回复此楼