Running fselect using Python
Question: I am trying to run this python script called fselect in windows 7. It can be
downloaded from this website: <http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/>
under this name called Feature selection tool. I am running it on Python
2.7.2.Facing a bit of problem running it..

Typed this first in IDLE:

    
    
    >>> import pprint
    >>> import sys
    >>> print pprint.pprint(sys.path)
    >>> sys.path.append("C:\Users\HP\Documents\MATLAB\libsvm-3.11\tools")
    >>> import fselect
    Usage:  training_file [testing_file]
    

Then the problem is when i type the next part:

Tried this:

    
    
    >>> ./fselect.py TrainVec
    SyntaxError: invalid syntax
    

Next tried this:

    
    
    >>> fselect.py TrainVec
    SyntaxError: invalid syntax
    

Next tried this:

    
    
    >>> TrainVec
    
    Traceback (most recent call last):
      File "<pyshell#7>", line 1, in <module>
        TrainVec
    NameError: name 'TrainVec' is not defined
    

Tried this also:

    
    
    >>> TrainVec.mat
    
    Traceback (most recent call last):
      File "<pyshell#8>", line 1, in <module>
        TrainVec.mat
    NameError: name 'TrainVec' is not defined
    

What is the correct way of typing it? Need some guidance on it...

tried running using cmd but there is an error...

![enter image description here](http://i.stack.imgur.com/dVCOP.png)


Answer: If you are trying to run the `fselect.py` directly from the command prompt,
make sure that python is set into the path variable. For guidance with that,
please read <http://people.cis.ksu.edu/~schmidt/200f07/setpath.html>.

The script will also invoke `grid.py`. `grid.py` requires `gnuplot` to be
there. So ensure that `grid.py` is running properly and if necessary check the
paths of the `svm_train`, `svm_test` in the script along with that of
`grid.py`. Hope it will work now.

