summaryrefslogtreecommitdiff
path: root/gerber/rs274x.py
diff options
context:
space:
mode:
Diffstat (limited to 'gerber/rs274x.py')
-rw-r--r--gerber/rs274x.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py
index b19913b..76e5101 100644
--- a/gerber/rs274x.py
+++ b/gerber/rs274x.py
@@ -48,7 +48,7 @@ def read(filename):
return GerberParser().parse(filename)
-def loads(data):
+def loads(data, filename=None):
""" Generate a GerberFile object from rs274x data in memory
Parameters
@@ -56,12 +56,15 @@ def loads(data):
data : string
string containing gerber file contents
+ filename : string, optional
+ string containing the filename of the data source
+
Returns
-------
file : :class:`gerber.rs274x.GerberFile`
A GerberFile created from the specified file.
"""
- return GerberParser().parse_raw(data)
+ return GerberParser().parse_raw(data, filename)
class GerberFile(CamFile):