<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python script in Splunk distance between IPs in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Python-script-in-Splunk-distance-between-IPs/m-p/29168#M324</link>
    <description>&lt;P&gt;Just as it says, you need to indent the code within the &lt;CODE&gt;calcDistance&lt;/CODE&gt; function. Python uses indentation instead of curly brackets.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jun 2011 11:23:57 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2011-06-16T11:23:57Z</dc:date>
    <item>
      <title>Python script in Splunk distance between IPs</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-script-in-Splunk-distance-between-IPs/m-p/29167#M323</link>
      <description>&lt;P&gt;Cannot run this python script from the command line $SPUNK_HOME/bin/scripts, can someone tell me why? &lt;/P&gt;

&lt;P&gt;Here is the error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$ python distance_two_IPs.py 20, 21, 45, 25
  File "distance_two_IPs.py", line 14
    yDistance = (lat2 - lat1) * nauticalMilePerLat
            ^
IndentationError: expected an indented block
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried to cut and past the script here, but it displayed without line-brakes. So I here is the link:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.geesblog.com/2009/01/calculating-distance-between-latitude-longitude-pairs-in-python/"&gt;http://www.geesblog.com/2009/01/calculating-distance-between-latitude-longitude-pairs-in-python/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2011 11:03:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-script-in-Splunk-distance-between-IPs/m-p/29167#M323</guid>
      <dc:creator>davecroto</dc:creator>
      <dc:date>2011-06-16T11:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Python script in Splunk distance between IPs</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-script-in-Splunk-distance-between-IPs/m-p/29168#M324</link>
      <description>&lt;P&gt;Just as it says, you need to indent the code within the &lt;CODE&gt;calcDistance&lt;/CODE&gt; function. Python uses indentation instead of curly brackets.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2011 11:23:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-script-in-Splunk-distance-between-IPs/m-p/29168#M324</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-06-16T11:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Python script in Splunk distance between IPs</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-script-in-Splunk-distance-between-IPs/m-p/29169#M325</link>
      <description>&lt;P&gt;Thanks Ayn!!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2011 12:54:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-script-in-Splunk-distance-between-IPs/m-p/29169#M325</guid>
      <dc:creator>davecroto</dc:creator>
      <dc:date>2011-06-16T12:54:23Z</dc:date>
    </item>
  </channel>
</rss>

