text: user4595: I am trying to run a script in python but I getting this error
  loan-mac-13:vcf2maf fi1d18$ python
  Python 2.7.10 (default, Feb 22 2019, 21:55:15) 
  [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import os
  >>> os.chdir("/Users/fi1d18/Downloads/vcf2maf-master/vcf2maf")
  >>> 
  >>> 
  >>> os.getcwd()
  '/Users/fi1d18/Downloads/vcf2maf-master/vcf2maf'
  >>> vcf2maf.py -h
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  NameError: name 'vcf2maf' is not defined
  >>> python vcf2maf.py -h
    File "<stdin>", line 1
      python vcf2maf.py -h
                   ^
  SyntaxError: invalid syntax
  >>> 
  
  Where I am doing wrong?
  Thanks for any help
  By your comments I run
  Sorry says that Last login: Wed Apr  1 11:50:14 on ttys000
  pc-133-235:~ fi1d18$ pwd
  /Users/fi1d18
  pc-133-235:~ fi1d18$ 
  pc-133-235:~ fi1d18$ cd Downloads
  pc-133-235:Downloads fi1d18$ python vcf2maf.py -h
  Traceback (most recent call last):
    File "vcf2maf.py", line 19, in <module>
      import vcf
  ImportError: No module named vcf
  pc-133-235:Downloads fi1d18$
  
  
  user298: You are trying to run a script file in the python console. That doesn't make sense. The console is for running commands manually, interactively. A script is a collection of commands. You can't just run that by name in the console. If you want to use it, copy the contents of your script and try to run them in the console. 
  The way you run a python script file is simply:
  python vcf2maf.py -h
  
  Or, assuming you have made the file executable and it has the right shebang line, just:
  ./vcf2maf.py -h
  
  
  The specific error you are getting is because foo.bar in Python means "run the bar method from the object foo. So vcf2maf.py means run py from vcf2maf. Since there is no object defined with the name vcf2maf, you get the name 'vcf2maf' is not defined.
  
original_text: 4595: <p>I am trying to run a script in python but I getting this error</p>
  
  <pre><code>loan-mac-13:vcf2maf fi1d18$ python
  Python 2.7.10 (default, Feb 22 2019, 21:55:15) 
  [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import os
  &gt;&gt;&gt; os.chdir("/Users/fi1d18/Downloads/vcf2maf-master/vcf2maf")
  &gt;&gt;&gt; 
  &gt;&gt;&gt; 
  &gt;&gt;&gt; os.getcwd()
  '/Users/fi1d18/Downloads/vcf2maf-master/vcf2maf'
  &gt;&gt;&gt; vcf2maf.py -h
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  NameError: name 'vcf2maf' is not defined
  &gt;&gt;&gt; python vcf2maf.py -h
    File "&lt;stdin&gt;", line 1
      python vcf2maf.py -h
                   ^
  SyntaxError: invalid syntax
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>Where I am doing wrong?</p>
  
  <p>Thanks for any help</p>
  
  <p>By your comments I run</p>
  
  <p>Sorry says that Last login: Wed Apr  1 11:50:14 on ttys000</p>
  
  <pre><code>pc-133-235:~ fi1d18<span class="math-container">$ pwd
  /Users/fi1d18
  pc-133-235:~ fi1d18$</span> 
  pc-133-235:~ fi1d18<span class="math-container">$ cd Downloads
  pc-133-235:Downloads fi1d18$</span> python vcf2maf.py -h
  Traceback (most recent call last):
    File "vcf2maf.py", line 19, in &lt;module&gt;
      import vcf
  ImportError: No module named vcf
  pc-133-235:Downloads fi1d18$
  </code></pre>
   298: <p>You are trying to run a script file in the python console. That doesn't make sense. The console is for running commands manually, interactively. A script is a collection of commands. You can't just run that by name in the console. If you want to use it, copy the <em>contents</em> of your script and try to run them in the console. </p>
  
  <p>The way you run a python <em>script file</em> is simply:</p>
  
  <pre><code>python vcf2maf.py -h
  </code></pre>
  
  <p>Or, assuming you have made the file executable and it has the right <a href="https://en.wikipedia.org/wiki/Shebang_(Unix)" rel="nofollow noreferrer">shebang line</a>, just:</p>
  
  <pre><code>./vcf2maf.py -h
  </code></pre>
  
  <hr>
  
  <p>The specific error you are getting is because <code>foo.bar</code> in Python means "run the <code>bar</code> method from the object <code>foo</code>. So <code>vcf2maf.py</code> means run <code>py</code> from <code>vcf2maf</code>. Since there is no object defined with the name <code>vcf2maf</code>, you get the <code>name 'vcf2maf' is not defined</code>.</p>
  