0

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. 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

1
  • 1
    I think you want to be using python session_eval_main.py in a command prompt or similar... It looks like you're trying to type the name of the script into IDLE or some other editor... Commented Jun 25, 2013 at 0:47

1 Answer 1

1

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 
Sign up to request clarification or add additional context in comments.

2 Comments

make sure you open python and not IDLE. IDLE is a document editor. you want to open the python command line. To use the code jh314 posted above, simply open command prompt and enter that in.
Also, make sure that session_eval_main.py is in your current directory when you run it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.