Skip to content

Commit 25dce0b

Browse files
authored
Merge pull request #1135 from mathics/importexportimprovements1
WIP: improving support for import/export internals
2 parents 5b8d8be + f5d29fa commit 25dce0b

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

mathics/builtin/importexport.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,34 @@ class ExportFormats(Predefined):
228228
def evaluate(self, evaluation):
229229
return Expression('List', *sorted(EXPORTERS.keys()))
230230

231+
class ConverterDumpsExtensionMappings(Predefined):
232+
"""
233+
<dl>
234+
<dt>'$extensionMappings'
235+
<dd>Returns a list of associations between file extensions and file types.
236+
</dl>
237+
"""
238+
context = 'System`ConvertersDump`'
239+
name = "$extensionMappings"
240+
attributes = ['Unprotected']
241+
242+
def evaluate(self, evaluation):
243+
return from_python(EXTENSIONMAPPINGS)
244+
245+
246+
class ConverterDumpsFormatMappings(Predefined):
247+
"""
248+
<dl>
249+
<dt>'$formatMappings'
250+
<dd>Returns a list of associations between file extensions and file types.
251+
</dl>
252+
"""
253+
context = 'System`ConvertersDump`'
254+
name = "$formatMappings"
255+
attributes = ['Unprotected']
256+
def evaluate(self, evaluation):
257+
return from_python(FORMATMAPPINGS)
258+
231259

232260
class ConverterDumpsExtensionMappings(Predefined):
233261
"""

0 commit comments

Comments
 (0)