<?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 Using pyc files for ArcGIS 10.1 Add-In in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-pyc-files-for-arcgis-10-1-add-in/m-p/295734#M22858</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can we use .pyc files for our ArcGIS Python Add-in?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This would be helpful for two things:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Quicker executing add-in code&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Including non-standard python modules/libraries with the Add-In as pyc files only (eg. wxPython precompiles to pyc on installation because there are usually no instances where source code need to be altered)&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jul 2012 14:50:07 GMT</pubDate>
    <dc:creator>MichaelMarkieta</dc:creator>
    <dc:date>2012-07-12T14:50:07Z</dc:date>
    <item>
      <title>Using pyc files for ArcGIS 10.1 Add-In</title>
      <link>https://community.esri.com/t5/python-questions/using-pyc-files-for-arcgis-10-1-add-in/m-p/295734#M22858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can we use .pyc files for our ArcGIS Python Add-in?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This would be helpful for two things:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Quicker executing add-in code&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Including non-standard python modules/libraries with the Add-In as pyc files only (eg. wxPython precompiles to pyc on installation because there are usually no instances where source code need to be altered)&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2012 14:50:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-pyc-files-for-arcgis-10-1-add-in/m-p/295734#M22858</guid>
      <dc:creator>MichaelMarkieta</dc:creator>
      <dc:date>2012-07-12T14:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using pyc files for ArcGIS 10.1 Add-In</title>
      <link>https://community.esri.com/t5/python-questions/using-pyc-files-for-arcgis-10-1-add-in/m-p/295735#M22859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, you can do this. This is how I was able to accomplish it:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Copy your .pyc file into the install folder of the add-in project&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. In the .py file that is created from the add-in wizard add the following code after the import statements:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import sys, os sys.path.append(os.path.dirname(__file__)) import yourmodulename&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 14:53:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-pyc-files-for-arcgis-10-1-add-in/m-p/295735#M22859</guid>
      <dc:creator>ChrisFox3</dc:creator>
      <dc:date>2012-07-13T14:53:57Z</dc:date>
    </item>
  </channel>
</rss>

