<?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: ArcGIS 10.2 - Which file the import time module references to? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50514#M3988</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for asking about the &lt;SPAN style="font-family: courier new,courier;"&gt;time.strptime&lt;/SPAN&gt; function in my script... And I appreciated the blog post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I cannot find out which file (or anything else) is missing on the other machines on which I wish to run the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The PythonWin gives me the following paths, but it doesn't tell me from which file the &lt;SPAN style="font-family: courier new,courier;"&gt;time.strptime&lt;/SPAN&gt; is coming from!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the time being, I intend to "suspend" any call to &lt;SPAN style="font-family: courier new,courier;"&gt;time.strptime&lt;/SPAN&gt; even if it makes the script less efficient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;PythonWin 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information.
&amp;gt;&amp;gt;&amp;gt; import sys
&amp;gt;&amp;gt;&amp;gt; sys.path
['', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\ArcGIS10.2\\DLLs', 'C:\\Python27\\ArcGIS10.2\\lib', 'C:\\Python27\\ArcGIS10.2\\lib\\plat-win',
'C:\\Python27\\ArcGIS10.2\\lib\\lib-tk',
'C:\\Python27\\ArcGIS10.2\\Lib\\site-packages\\pythonwin',
'C:\\Python27\\ArcGIS10.2',
'C:\\Python27\\ArcGIS10.2\\lib\\site-packages',
'C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\bin',
'C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\arcpy',
'C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\ArcToolbox\\Scripts',
'C:\\Python27\\ArcGIS10.2\\lib\\site-packages\\win32',
'C:\\Python27\\ArcGIS10.2\\lib\\site-packages\\win32\\lib']
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to build up more knowledge about Python and arcpy to solve this sort of problems...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 21:57:06 GMT</pubDate>
    <dc:creator>VincentLaunstorfer</dc:creator>
    <dc:date>2021-12-10T21:57:06Z</dc:date>
    <item>
      <title>ArcGIS 10.2 - Which file the import time module references to?</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50506#M3980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a python script tool importing several modules such as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14527813052295439 jive_text_macro" data-renderedposition="92_8_912_16" jivemacro_uid="_14527813052295439"&gt;&lt;P&gt;import sys, string, os, arcpy, time&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In particular, I am interested in the time module because I call the &lt;SPAN style="font-family: courier new,courier;"&gt;time.strftime&lt;/SPAN&gt; function in the script...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The tool works fine on my machine but fails to execute on another machine, crashing when the function &lt;SPAN style="font-family: courier new,courier;"&gt;time.strftime&lt;/SPAN&gt; is called!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, I would like to find out which file on my machine the import time module references to. Then, I could copy this file on the other machine to make my tool works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 14:23:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50506#M3980</guid>
      <dc:creator>VincentLaunstorfer</dc:creator>
      <dc:date>2016-01-14T14:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10.2 - Which file the import time module references to?</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50507#M3981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;time is a standard python module&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14527818110802073 jive_text_macro" data-renderedposition="29_8_912_16" jivemacro_uid="_14527818110802073"&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; import time&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;has to be a line in the script at the top of the script, or import it&amp;nbsp; at the interactive prompt, type it in to import the module as shown above&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 14:27:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50507#M3981</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-01-14T14:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10.2 - Which file the import time module references to?</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50508#M3982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is already a line at the beginning of the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Import system modules
import sys, string, os, arcpy, time&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the time module probably references to a file which is not on the other machine, I imagine. It works on mine...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:57:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50508#M3982</guid>
      <dc:creator>VincentLaunstorfer</dc:creator>
      <dc:date>2021-12-10T21:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10.2 - Which file the import time module references to?</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50509#M3983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then their python is either non-existent or installed improperly.&amp;nbsp; Try and locate the python path using windows explorer.&amp;nbsp; it will either be in &lt;/P&gt;&lt;P&gt;c:\Python27\.... or&lt;/P&gt;&lt;P&gt;c :\Python34\...&lt;/P&gt;&lt;P&gt;depending on the version of python.&amp;nbsp; If it is not a normal install, or a virtual install...have a chat with the other person to find out how it was installed. and check for a python path or python environment setting&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 14:53:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50509#M3983</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-01-14T14:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10.2 - Which file the import time module references to?</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50510#M3984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Python looks installed correctly on the other machine with a C:\Python27\ArcGIS10.2\ folder containing the libraries and all the stuff... It looks like. This is why I was suspecting the file to which the time module references might be not in the right place!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or there is a variable to set in order to indicate explicitly where to ook for Python libraries, modules...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition to find out the file the &lt;SPAN style="font-family: courier new,courier;"&gt;time&lt;/SPAN&gt; module references to, where is it possible to check/set the path and other variable for Python?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 15:10:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50510#M3984</guid>
      <dc:creator>VincentLaunstorfer</dc:creator>
      <dc:date>2016-01-14T15:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10.2 - Which file the import time module references to?</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50511#M3985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What IDE are you using? PyScripter? PythonWin? just IDLE in ArcMap?&lt;/P&gt;&lt;P&gt;Dare I get you to try to import sys, but here is an example from PythonWin (pyscripter is the same) and python 3.4 the relevant ones have been highlighted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import sys
&amp;gt;&amp;gt;&amp;gt; sys.path
['', '...',
 'C:\\Python34\\DLLs',
 'C:\\Python34\\lib',
 'C:\\Python34\\Lib\\site-packages\\pythonwin',
 &lt;STRONG&gt;'C:\\Python34'&lt;/STRONG&gt;,
 &lt;STRONG&gt;'C:\\Python34\\lib\\site-packages'&lt;/STRONG&gt;,
 'C:\\Program Files\\ArcGIS\\Pro\\bin',
 'C:\\Program Files\\ArcGIS\\Pro\\Resources\\ArcPy',
 'C:\\Program Files\\ArcGIS\\Pro\\Resources\\ArcToolBox\\Scripts',
 'C:\\Python34\\lib\\site-packages\\win32',
 'C:\\Python34\\lib\\site-packages\\win32\\lib','...']
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and from python 2.7&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;PythonWin 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information.
&amp;gt;&amp;gt;&amp;gt; import sys
&amp;gt;&amp;gt;&amp;gt; sys.path
['', '...',
 'C:\\Python27\\ArcGIS10.3\\DLLs',
 'C:\\Python27\\ArcGIS10.3\\lib',
 'C:\\Python27\\ArcGIS10.3\\lib\\plat-win',
 'C:\\Python27\\ArcGIS10.3\\lib\\lib-tk',
 'C:\\Python27\\ArcGIS10.3\\Lib\\site-packages\\pythonwin',
 'C:\\Python27\\ArcGIS10.3',
 'C:\\Python27\\ArcGIS10.3\\lib\\site-packages',
 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.3\\bin',
 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.3\\ArcPy',
 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.3\\ArcToolBox\\Scripts',
 'C:\\Python27\\ArcGIS10.3\\lib\\site-packages\\win32',
 'C:\\Python27\\ArcGIS10.3\\lib\\site-packages\\win32\\lib']
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And of course yours may differ...I am using ArcGIS10.3.1 and ArcGIS PRO&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:57:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50511#M3985</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-10T21:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10.2 - Which file the import time module references to?</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50512#M3986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have posted a note on the topic of where to find modules here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migration-blogpost/55447"&gt;What is standard and not ... in python&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jan 2016 18:17:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50512#M3986</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-01-16T18:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10.2 - Which file the import time module references to?</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50513#M3987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;problem solved? or still ongoing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2016 05:59:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50513#M3987</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-01-20T05:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10.2 - Which file the import time module references to?</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50514#M3988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for asking about the &lt;SPAN style="font-family: courier new,courier;"&gt;time.strptime&lt;/SPAN&gt; function in my script... And I appreciated the blog post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I cannot find out which file (or anything else) is missing on the other machines on which I wish to run the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The PythonWin gives me the following paths, but it doesn't tell me from which file the &lt;SPAN style="font-family: courier new,courier;"&gt;time.strptime&lt;/SPAN&gt; is coming from!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the time being, I intend to "suspend" any call to &lt;SPAN style="font-family: courier new,courier;"&gt;time.strptime&lt;/SPAN&gt; even if it makes the script less efficient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;PythonWin 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information.
&amp;gt;&amp;gt;&amp;gt; import sys
&amp;gt;&amp;gt;&amp;gt; sys.path
['', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\ArcGIS10.2\\DLLs', 'C:\\Python27\\ArcGIS10.2\\lib', 'C:\\Python27\\ArcGIS10.2\\lib\\plat-win',
'C:\\Python27\\ArcGIS10.2\\lib\\lib-tk',
'C:\\Python27\\ArcGIS10.2\\Lib\\site-packages\\pythonwin',
'C:\\Python27\\ArcGIS10.2',
'C:\\Python27\\ArcGIS10.2\\lib\\site-packages',
'C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\bin',
'C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\arcpy',
'C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\ArcToolbox\\Scripts',
'C:\\Python27\\ArcGIS10.2\\lib\\site-packages\\win32',
'C:\\Python27\\ArcGIS10.2\\lib\\site-packages\\win32\\lib']
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to build up more knowledge about Python and arcpy to solve this sort of problems...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:57:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50514#M3988</guid>
      <dc:creator>VincentLaunstorfer</dc:creator>
      <dc:date>2021-12-10T21:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10.2 - Which file the import time module references to?</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50515#M3989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;again... time is built-in... there is no file like other files... python is being looked for in the wrong place or it is installed incorrectly or corrupt.&amp;nbsp;&amp;nbsp; re-install it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2016 16:15:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-10-2-which-file-the-import-time-module/m-p/50515#M3989</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-01-20T16:15:18Z</dc:date>
    </item>
  </channel>
</rss>

