简体   繁体   English

如何在解释器中运行python文件

[英]how to run a python file in interpreter

Hi I have never used python and I am trying to run session_eval_main.py file that processes 3 text files and outputs the result. 嗨,我从未使用过python,而是尝试运行session_eval_main.py文件,该文件处理3个文本文件并输出结果。 but when I try to run it in the interpreter I get the following error: 但是当我尝试在解释器中运行它时,出现以下错误:

Traceback <most recent call last>:
  File "<stdin>", line 1, in <module>
NameError: name 'session_eval_main' is not defined

Can anyone help me here. 有人能帮我一下吗。

Thanks 谢谢

Just do this: 只要这样做:

python session_eval_main.py

I'm assuming that you are referring to this script . 我假设您正在引用此脚本 If this assumption is true, then you can add flags: 如果这个假设是正确的,那么您可以添加标志:

Usage:
$ python session_eval_main.py 
--qrel_file=qrels 
--mapping_file=topics_sessions 
--run_file=runs
--dup_file=dups 
--per_session=0 
--cutoff=10 
--write_to_file=0 

If you need help with what each flag does, run this: 如果您需要每个标志的帮助,请运行以下命令:

$ python session_eval_main.py --help

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM