Skip to content

Commit b27e42d

Browse files
committed
html and xml modules to fileformat
1 parent 16b741e commit b27e42d

7 files changed

Lines changed: 17 additions & 8 deletions

File tree

mathics/builtin/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def is_builtin(var):
145145

146146
disable_file_module_names = [] if ENABLE_FILES_MODULE else ["files_io.files", "files_io.importexport"]
147147

148-
for subdir in ("drawing", "files_io", "numbers", "specialfns",):
148+
for subdir in ("drawing", "files_io", "numbers", "specialfns", "fileformats"):
149149
import_name = f"{__name__}.{subdir}"
150150

151151
if import_name in disable_file_module_names:

mathics/builtin/arithmetic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- coding: utf-8 -*-
2+
# cython: language_level=3
23

34
"""
45
Mathematical Functions
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""
2+
Fileformats
3+
4+
Importers / Exporters use some internal routines/ Symbols to accomplish their task. Submodules
5+
in this folder contain these routines. The context of the corresponding symbols are subcontexts of
6+
System`, like System`HTML` or System`XML to avoid spoil the System` namespace.
7+
8+
9+
"""
10+
11+
from mathics.version import __version__ # noqa used in loading to check consistency.
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# cython: language_level=3
2+
33

44
"""
55
HTML
@@ -11,9 +11,6 @@
1111
from mathics.version import __version__ # noqa used in loading to check consistency.
1212

1313

14-
from __future__ import unicode_literals
15-
16-
1714
from mathics.builtin.base import Builtin
1815
from mathics.builtin.files_io.files import mathics_open
1916
from mathics.core.expression import Expression, String, Symbol, from_python

mathics/builtin/files_io/filesystem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,9 +1206,9 @@ class FileNames(Builtin):
12061206
>> FileNames["*.m", "formats"]//Length
12071207
= 0
12081208
>> FileNames["*.m", "formats", 3]//Length
1209-
= 12
1209+
= 13
12101210
>> FileNames["*.m", "formats", Infinity]//Length
1211-
= 12
1211+
= 13
12121212
"""
12131213
# >> FileNames[]//Length
12141214
# = 2

mathics/data/ExampleData/copyright.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Testosterone.svg Public Domain http://en.wikipedia.org/wiki/File:Testosteron.svg
1414
InventionNo1.xml GNU Free Documentation License http://openmusicscore.org/index.php?option=com_content&view=article&id=125:invention-no-1-bwv-772-bach-johann-sebastian&catid=84&Itemid=531
1515
Namespaces.xml CC BY-NC-SA License http://edutechwiki.unige.ch/en/XML_namespace "A larger example of namespace scoping" with comments removed
1616
Middlemarch.txt The Project Gutenberg License https://archive.org/details/middlemarch00145gut Chapter 75 of George Eliot's novel Middlemarch in ISO Latin 1 (8859-1) encoding
17-
PrimeMeridian.html CC-BY-SA and GFDL https://en.wikipedia.org/wiki/Prime_meridian HTML of the English Wikipedia entry for "Prime Meridian" as of 2016/11/02; also see https://en.wikipedia.org/wiki/Wikipedia:Reusing_Wikipedia_content
17+
PrimeMeridian.html CC-BY-SA and GFDL https://en.wikipedia.org/wiki/Prime_meridian HTML of the English Wikipedia entry for "Prime Meridian" as of 2016/11/02; also see https://en.wikipedia.org/wiki/Wikipedia:Reusing_Wikipedia_content

0 commit comments

Comments
 (0)