<?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 IDLE, *.pyt files, colour highlighting and 64bit in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/idle-pyt-files-colour-highlighting-and-64bit/m-p/691072#M53554</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just created my first Python toolbox and when I right-clicked to Edit it the editor defaulted to Notepad.&amp;nbsp; I much prefer IDLE and so went to Geoprocessing Options to set the Editor as C:\Python27\ArcGIS10.1\Lib\idlelib\idle.pyw.&amp;nbsp; This enabled Edit to open IDLE but with none of the nice colour highlighting on the text which I assume is because of the *.pyt rather than *.py extension.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there an easy way to have IDLE do colour highlighting on a *.pyt file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, when setting the Editor I could have chosen C:\Python27\ArcGISx6410.1\lib\idlelib\idle.pyw instead of C:\Python27\ArcGIS10.1\Lib\idlelib\idle.pyw - does it matter which I choose?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm assuming that Desktop put C:\Python27\ArcGIS10.1\Lib\idlelib\idle.pyw there and uses it while Server installed and uses C:\Python27\ArcGISx6410.1\lib\idlelib\idle.pyw .&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Oct 2011 10:42:01 GMT</pubDate>
    <dc:creator>GraemeBrowning1</dc:creator>
    <dc:date>2011-10-11T10:42:01Z</dc:date>
    <item>
      <title>IDLE, *.pyt files, colour highlighting and 64bit</title>
      <link>https://community.esri.com/t5/python-questions/idle-pyt-files-colour-highlighting-and-64bit/m-p/691072#M53554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just created my first Python toolbox and when I right-clicked to Edit it the editor defaulted to Notepad.&amp;nbsp; I much prefer IDLE and so went to Geoprocessing Options to set the Editor as C:\Python27\ArcGIS10.1\Lib\idlelib\idle.pyw.&amp;nbsp; This enabled Edit to open IDLE but with none of the nice colour highlighting on the text which I assume is because of the *.pyt rather than *.py extension.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there an easy way to have IDLE do colour highlighting on a *.pyt file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, when setting the Editor I could have chosen C:\Python27\ArcGISx6410.1\lib\idlelib\idle.pyw instead of C:\Python27\ArcGIS10.1\Lib\idlelib\idle.pyw - does it matter which I choose?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm assuming that Desktop put C:\Python27\ArcGIS10.1\Lib\idlelib\idle.pyw there and uses it while Server installed and uses C:\Python27\ArcGISx6410.1\lib\idlelib\idle.pyw .&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 10:42:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/idle-pyt-files-colour-highlighting-and-64bit/m-p/691072#M53554</guid>
      <dc:creator>GraemeBrowning1</dc:creator>
      <dc:date>2011-10-11T10:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: IDLE, *.pyt files, colour highlighting and 64bit</title>
      <link>https://community.esri.com/t5/python-questions/idle-pyt-files-colour-highlighting-and-64bit/m-p/691073#M53555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Graeme,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to edit the source code for IDLE to accomplish this. Go to your idelib folder for the install of IDLE and edit the EditorWindow.py file (you may want to make a copy just in case there is a problem). Go to the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
def ispythonsource(self, filename):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if not filename or os.path.isdir(filename):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; base, ext = os.path.splitext(os.path.basename(filename))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if os.path.normcase(ext) in (".py", ".pyw")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return True
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Add ".pyt" to the list of extension to check and save the changes. This should now highlight the syntax when you open it in IDLE.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:05:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/idle-pyt-files-colour-highlighting-and-64bit/m-p/691073#M53555</guid>
      <dc:creator>ChrisFox3</dc:creator>
      <dc:date>2021-12-12T05:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: IDLE, *.pyt files, colour highlighting and 64bit</title>
      <link>https://community.esri.com/t5/python-questions/idle-pyt-files-colour-highlighting-and-64bit/m-p/691074#M53556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks!&amp;nbsp; that works just fine!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2011 14:11:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/idle-pyt-files-colour-highlighting-and-64bit/m-p/691074#M53556</guid>
      <dc:creator>KevinBell</dc:creator>
      <dc:date>2011-10-14T14:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: IDLE, *.pyt files, colour highlighting and 64bit</title>
      <link>https://community.esri.com/t5/python-questions/idle-pyt-files-colour-highlighting-and-64bit/m-p/691075#M53557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can the same be set up for PythonWin?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2013 15:29:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/idle-pyt-files-colour-highlighting-and-64bit/m-p/691075#M53557</guid>
      <dc:creator>DavidAllen</dc:creator>
      <dc:date>2013-06-28T15:29:28Z</dc:date>
    </item>
  </channel>
</rss>

