<?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>idea Provide list of known GIS extensions in Python Ideas</title>
    <link>https://community.esri.com/t5/python-ideas/provide-list-of-known-gis-extensions/idi-p/1386769</link>
    <description>&lt;P&gt;This is a followup to &lt;A href="https://community.esri.com/t5/python-ideas/functio-to-list-non-gis-files/idc-p/1377458/highlight/true#M282" target="_blank" rel="noopener"&gt;Functio to List Non-GIS files - Esri Community&lt;/A&gt;, which was closed. Apparently, it's too much work to whitelist file types. But it should be pretty easy to blacklist them?&lt;/P&gt;&lt;P&gt;To take &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/450745"&gt;@EsriQruqs&lt;/a&gt;'s idea:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Even better (IMO) and far easier would be for Esri to provide a list of known GIS extensions, much like:&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; import string
&amp;gt;&amp;gt;&amp;gt; string.punctuation
'!"#$%&amp;amp;\'()*+,-./:;&amp;lt;=&amp;gt;?@[\\]^_`{|}~'&lt;/PRE&gt;&lt;P&gt;But instead one would receive a list of strings.&lt;/P&gt;&lt;P&gt;This they could tuck away in some simple module and make it available for downloading or something. Or why not just a code snippet somewhere in the docs?&lt;/P&gt;&lt;P&gt;So, in your code you could do:&lt;/P&gt;&lt;PRE&gt;for FILE in os.listdir('.'):
    if not os.path.splitext(FILE)[1] in gistypes:
        other_files.append(FILE)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;I think this is a pretty viable solution, with the added bonus of the&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;publisher&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;SPAN&gt;making this information available instead of the user(s) independently trying to compile a list of file extensions based on their own data.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2024 15:31:42 GMT</pubDate>
    <dc:creator>AlfredBaldenweck</dc:creator>
    <dc:date>2024-02-26T15:31:42Z</dc:date>
    <item>
      <title>Provide list of known GIS extensions</title>
      <link>https://community.esri.com/t5/python-ideas/provide-list-of-known-gis-extensions/idi-p/1386769</link>
      <description>&lt;P&gt;This is a followup to &lt;A href="https://community.esri.com/t5/python-ideas/functio-to-list-non-gis-files/idc-p/1377458/highlight/true#M282" target="_blank" rel="noopener"&gt;Functio to List Non-GIS files - Esri Community&lt;/A&gt;, which was closed. Apparently, it's too much work to whitelist file types. But it should be pretty easy to blacklist them?&lt;/P&gt;&lt;P&gt;To take &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/450745"&gt;@EsriQruqs&lt;/a&gt;'s idea:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Even better (IMO) and far easier would be for Esri to provide a list of known GIS extensions, much like:&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; import string
&amp;gt;&amp;gt;&amp;gt; string.punctuation
'!"#$%&amp;amp;\'()*+,-./:;&amp;lt;=&amp;gt;?@[\\]^_`{|}~'&lt;/PRE&gt;&lt;P&gt;But instead one would receive a list of strings.&lt;/P&gt;&lt;P&gt;This they could tuck away in some simple module and make it available for downloading or something. Or why not just a code snippet somewhere in the docs?&lt;/P&gt;&lt;P&gt;So, in your code you could do:&lt;/P&gt;&lt;PRE&gt;for FILE in os.listdir('.'):
    if not os.path.splitext(FILE)[1] in gistypes:
        other_files.append(FILE)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;I think this is a pretty viable solution, with the added bonus of the&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;publisher&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;SPAN&gt;making this information available instead of the user(s) independently trying to compile a list of file extensions based on their own data.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 15:31:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-ideas/provide-list-of-known-gis-extensions/idi-p/1386769</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2024-02-26T15:31:42Z</dc:date>
    </item>
  </channel>
</rss>

