File Path/Global name issue

John Gordon gordon at
Thu Mar 20 22:31:15 CET 2014

In <2089d20b-aa60-462f-aad0-51109849cf36 at> roy.snuffles at writes:

> I am currently running code for a program called HotNet (

> In its file, there is a place to insert a file path to be run. 

> parser.add_argument('-mf', '--infmat_file', required=True,
>                         help='Path to .mat file containing influence matrix')

> My path file is /home/lai/Downloads/influence_matrix_files/hprd_inf_.mat

You're completely misunderstanding the purpose of this line of code.  Its
intent is to allow you to pass the matrix file location to the script by
using the '-mf' or '--infmat_file' arguments, thus not requiring you to
edit the script at all.

The 'help' parameter provides a message explaining the usage of that
particular argument if the script is executed with the '-help'

For example, if you were unsure how to use the script, you
might run this command: -help

And you might see output that looks like this:

    Usage: [options]

      -h, --help            show this help message and exit
      -mf, --infmat_file    Path to .mat file containing influence matrix
      -d, --dance           do a little dance
      -l, --love            make a little love

The help message thus informs you that you can provide the location to an
influence matrix file by using the '-mf' or '--infmat_file' arguments.
There are also -d and -l options that do ... something.

John Gordon         Imagine what it must be like for a real medical doctor to
gordon at    watch 'House', or a real serial killer to watch 'Dexter'.

More information about the Python-list mailing list