<?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: Display Computer Names in Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/display-computer-names-in-python/m-p/386322#M30480</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There will be quite a few ways to do this. I've listed a couple of the more popular options below. Each of these pages will provide examples on how to use the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Python os.listdir() Method&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.tutorialspoint.com/python/os_listdir.htm" title="http://www.tutorialspoint.com/python/os_listdir.htm"&gt;http://www.tutorialspoint.com/python/os_listdir.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;glob - Filename pattern matching&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pymotw.com/2/glob/" title="https://pymotw.com/2/glob/"&gt;https://pymotw.com/2/glob/&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Working with Directories&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://www.diveintopython.net/file_handling/os_module.html" title="http://www.diveintopython.net/file_handling/os_module.html"&gt;http://www.diveintopython.net/file_handling/os_module.html&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;List Files (arcpy)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/listfiles.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/listfiles.htm"&gt;http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/listfiles.htm&lt;/A&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jul 2016 21:11:44 GMT</pubDate>
    <dc:creator>FreddieGibson</dc:creator>
    <dc:date>2016-07-14T21:11:44Z</dc:date>
    <item>
      <title>Display Computer Names in Python</title>
      <link>https://community.esri.com/t5/python-questions/display-computer-names-in-python/m-p/386318#M30476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I am running ArcGIS 10.1 using file geodatabases.&amp;nbsp; In order to update information across geodatabases I run a model that copies the information to each, unless the data is in use, causing a schema lock.&amp;nbsp; If I were to convert my model into a python script, is there any way to have it display the users computer name that is causing the schema lock?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2016 16:42:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/display-computer-names-in-python/m-p/386318#M30476</guid>
      <dc:creator>MattDeveney</dc:creator>
      <dc:date>2016-07-14T16:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Display Computer Names in Python</title>
      <link>https://community.esri.com/t5/python-questions/display-computer-names-in-python/m-p/386319#M30477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;never had the need to use, nor tried, nor know if it will work in an Arc* environment, but the Stack Overflow choices seem to be ... &lt;A href="http://stackoverflow.com/questions/799767/getting-name-of-windows-computer-running-python-script" title="http://stackoverflow.com/questions/799767/getting-name-of-windows-computer-running-python-script"&gt;Getting name of windows computer running python script? - Stack Overflow&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2016 16:49:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/display-computer-names-in-python/m-p/386319#M30477</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-07-14T16:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Display Computer Names in Python</title>
      <link>https://community.esri.com/t5/python-questions/display-computer-names-in-python/m-p/386320#M30478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't believe there is an out-of-the-box way to do this if you're not using an enterprise geodatabase. If you wanted to get an idea of what machine may have created the lock I'd think that you can use pure python to list out the *.lock files that appear in the geodatabase. From this file you should be able to parse out the machine accessing the content within the geodatabase. For example, I tried this out on my machine and I can see that there are lock files with the following names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_gdb.UZUMAKI.10792.10812.SR.lock&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above case UZUMAKI is the hostname for my machine that is accessing the data. If needed you could use the following class to check if you're able to get an exclusive lock on the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TestSchemaLock&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/testschemalock.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/testschemalock.htm"&gt;http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/testschemalock.htm&lt;/A&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2016 17:06:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/display-computer-names-in-python/m-p/386320#M30478</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2016-07-14T17:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Display Computer Names in Python</title>
      <link>https://community.esri.com/t5/python-questions/display-computer-names-in-python/m-p/386321#M30479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for your reply.&amp;nbsp; Would you have an example script that would produce a list of *.lock files for a particular geodatabase?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2016 20:15:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/display-computer-names-in-python/m-p/386321#M30479</guid>
      <dc:creator>MattDeveney</dc:creator>
      <dc:date>2016-07-14T20:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Display Computer Names in Python</title>
      <link>https://community.esri.com/t5/python-questions/display-computer-names-in-python/m-p/386322#M30480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There will be quite a few ways to do this. I've listed a couple of the more popular options below. Each of these pages will provide examples on how to use the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Python os.listdir() Method&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.tutorialspoint.com/python/os_listdir.htm" title="http://www.tutorialspoint.com/python/os_listdir.htm"&gt;http://www.tutorialspoint.com/python/os_listdir.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;glob - Filename pattern matching&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pymotw.com/2/glob/" title="https://pymotw.com/2/glob/"&gt;https://pymotw.com/2/glob/&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Working with Directories&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://www.diveintopython.net/file_handling/os_module.html" title="http://www.diveintopython.net/file_handling/os_module.html"&gt;http://www.diveintopython.net/file_handling/os_module.html&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;List Files (arcpy)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/listfiles.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/listfiles.htm"&gt;http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/listfiles.htm&lt;/A&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2016 21:11:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/display-computer-names-in-python/m-p/386322#M30480</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2016-07-14T21:11:44Z</dc:date>
    </item>
  </channel>
</rss>

