diff --git a/UltiMaker-Cura.spec.jinja b/UltiMaker-Cura.spec.jinja index bd7de23a2b0..f567919cdb7 100644 --- a/UltiMaker-Cura.spec.jinja +++ b/UltiMaker-Cura.spec.jinja @@ -276,4 +276,10 @@ app = UMBUNDLE( 'CFBundleTypeName': 'Model Files', }] }, + 'CFBundleTypeExtensions': [ + 'stl', + 'obj', + '3mf', + 'gcode' + ] ){% endif %} diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 722a728863f..98d83315fcd 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -129,6 +129,30 @@ numpy.seterr(all = "ignore") +import urllib.request as urlreq +from io import StringIO as strio + + +class PyProtoHandler(urlreq.BaseHandler): + def python_open(self, req): + fullUrl = req.get_full_url() + Logger.log("i", "LOOKFORTHIS %s", fullUrl) + return strio(fullUrl) + + +opener = urlreq.build_opener(PyProtoHandler()) +urlreq.install_opener(opener) + +try: + Logger.info("i", "AAAAAAAAAA") + Logger.info("i", sys.argv) + urlArg = sys.argv[1] + Logger.info("i", "BBBBBBBBBB") + urlreq.urlopen(urlArg) +except Exception as e: + print("ERROR: %s" % e) + pass + class CuraApplication(QtApplication): # SettingVersion represents the set of settings available in the machine/extruder definitions. # You need to make sure that this version number needs to be increased if there is any non-backwards-compatible