title: ANTRL4: Can't get Python ANTLR to generate a graphic of the parse tree
body: <p>I have a simple <code>HelloWorld.g4</code> grammar (see it at the bottom). I am able to successfully generate the <code>.py</code> files using this:</p>
  
  <pre><code>set CLASSPATH=.;antlr-complete.jar;%CLASSPATH%
  
  java org.antlr.v4.Tool -Dlanguage=Python2 HelloWorld.g4
  </code></pre>
  
  <p>Now I would like to use the <code>TestRig</code> with the <code>-gui</code> flag to generate a parse tree GUI. I have the ANTRL Python runtime installed (<code>antlr4-python2-runtime-4.5.tar.gz</code>). I can open a Python interpreter and type: </p>
  
  <pre><code>import antlr4
  </code></pre>
  
  <p>and  the interpreter recognizes the <code>antlr4</code> module.</p>
  
  <p>When I run the <code>TestRig</code> like this:</p>
  
  <pre><code>set CLASSPATH=.;antlr-complete.jar;%CLASSPATH%
  
  java org.antlr.v4.gui.TestRig HelloWorld message -gui &lt; input.txt
  </code></pre>
  
  <p>I get this error message:</p>
  
  <pre><code>Can't load HelloWorld as lexer or parser
  </code></pre>
  
  <p>From my investigations I have found several posts listing the same error message. However, in those cases they forgot to include period (.) in their classpath. But as you can see, I have included it in my classpath.</p>
  
  <p>I'm out of ideas on how to get the <code>TestRig</code> to work. Note: I have no problem getting the <code>TestRig</code> to work with the same <code>HelloWorld</code> grammar when the target language is Java.</p>
  
  <p>Any help you can provide would be greatly appreciated.</p>
  
  <p><strong>HelloWorld.g4</strong></p>
  
  <pre><code>grammar HelloWorld;   
  
  options { language=Python; }            
  
  message   : GREETING NAME;
  
  GREETING : 'Hello' ;    
  NAME     : [a-zA-Z]+ ;                      
  WS       : [ \t\r\n]+ -&gt; skip ; 
  </code></pre>