我正在尝试使用 “ python get_timestamp.py -f gsham_input.xvg -1 -0.1348 -2 -0.1109”
运行以下python 。但是,似乎python错误地将小数点前的减号加了破折号,并显示了以下错误:“ file”
get_timestamp.py“,第21行,在value1 =
float(arg)ValueError中:float()的无效文字:−0.1348“您能帮助我知道如何解决吗?
谢谢。
#!/usr/bin/env python
"""
Given two values, looks in a 3 column-file (output of sham.pl)
which time frame matches closest.
"""
import sys
USAGE = "USAGE: get_timestamp.py -f -1 -2 \n"
# Parse arguments
read_input, read_value1, read_value2 = False, False, False
input_file, value1, value2 = None, None, None
for arg in sys.argv[1:]:
if read_input:
read_input = False
input_file = arg
elif read_value1:
read_value1 = False
value1 =