From a758080189549a78c194b0ef1ec07e6bfc267256 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 1 Nov 2023 17:44:01 +0100 Subject: [PATCH] Log args --- cura/CuraApplication.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 722a728863f..55508aa1b6d 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", sys.argv) + Logger.info("i", "AAAAAAAAAA") + 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