【发布时间】:2018-02-25 18:19:13
【问题描述】:
我有两个要求。
第一个要求-我想读取文件的最后一行并将最后一个值分配给python中的变量。
第二个要求-
这是我的示例文件。
<serviceNameame="demo" wsdlUrl="demo.wsdl" serviceName="demo"/>
<context:property-placeholder location="filename.txt"/>
我想从这个文件中读取内容,即 filename.txt,它将在 <context:property-placeholder location= . 之后。并且想将该值分配给 python 中的变量。
【问题讨论】:
标签: python python-3.x python-2.7 file