From rzepp at aclara.com Wed Aug 16 18:41:17 2017 From: rzepp at aclara.com (Zepp, Robert) Date: Wed, 16 Aug 2017 22:41:17 +0000 Subject: [Python-porting] Porting Problem Message-ID: Please, How do I make the following line compile in 3.6 ? batchfile = importlib.Loader.exec_module('batch_file', TestScript_fd, FullFilePath, ('.py', 'r', importlib.PY_SOURCE)) Thanks. Robert Zepp Senior Firmware Engineer [https://aclara.wpengine.com/sigb/images/aclara_primary_logo.png] [https://aclara.wpengine.com/sigb/images/index24_07.png] [https://aclara.wpengine.com/sigb/images/index24_08.png] [https://aclara.wpengine.com/sigb/images/aclara_connect_2018_logo.png] [https://aclara.wpengine.com/sigb/images/aclaraconnect_2018.png] [https://aclara.wpengine.com/sigb/images/linkedin.png] [https://aclara.wpengine.com/sigb/images/facebook.png] [https://aclara.wpengine.com/sigb/images/twitter.png] [https://aclara.wpengine.com/sigb/images/index24_14.png] P: 314 895 6543 C: 314 807 6600 E: rzepp at aclara.com W: aclara.com A: 945 Hornet Drive, Hazelwood MO 63042 This e-mail is intended for the addressee shown. Should you have received it in error, please delete this message and contact the sender. This e-mail and any attachments thereto may contain information that is privileged, confidential or proprietary. Any review, dissemination or use of this transmission or its contents by persons other than the addressee or authorized employees of the intended organizations is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 3206 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 1087 bytes Desc: image002.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 1050 bytes Desc: image003.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 4011 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.png Type: image/png Size: 4163 bytes Desc: image005.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image006.png Type: image/png Size: 1758 bytes Desc: image006.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image007.png Type: image/png Size: 1685 bytes Desc: image007.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image008.png Type: image/png Size: 1748 bytes Desc: image008.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image009.png Type: image/png Size: 1086 bytes Desc: image009.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image010.png Type: image/png Size: 1467 bytes Desc: image010.png URL: From regebro at gmail.com Wed Aug 23 09:20:31 2017 From: regebro at gmail.com (Lennart Regebro) Date: Wed, 23 Aug 2017 15:20:31 +0200 Subject: [Python-porting] Porting Problem In-Reply-To: References: Message-ID: What is it supposed to do, and what is the error message you get? On Thu, Aug 17, 2017 at 12:41 AM, Zepp, Robert wrote: > Please, > > > > How do I make the following line compile in 3.6 ? > > batchfile = importlib.Loader.exec_module(*'batch_file'*, TestScript_fd, > FullFilePath, (*'.py'*, *'r'*, importlib.PY_SOURCE)) > > > > Thanks. > > > > Robert Zepp > > Senior Firmware Engineer > > [image: https://aclara.wpengine.com/sigb/images/aclara_primary_logo.png] > > > [image: https://aclara.wpengine.com/sigb/images/index24_07.png] > > [image: https://aclara.wpengine.com/sigb/images/index24_08.png] > > [image: > https://aclara.wpengine.com/sigb/images/aclara_connect_2018_logo.png] > > > [image: https://aclara.wpengine.com/sigb/images/aclaraconnect_2018.png] > > > [image: https://aclara.wpengine.com/sigb/images/linkedin.png] > > > [image: https://aclara.wpengine.com/sigb/images/facebook.png] > > > [image: https://aclara.wpengine.com/sigb/images/twitter.png] > > > [image: https://aclara.wpengine.com/sigb/images/index24_14.png] > > [image: https://aclara.wpengine.com/sigb/images/index24_15.png] > > P: 314 895 6543 C: 314 807 6600 E: rzepp at aclara.com W: aclara.com A: > 945 Hornet Drive, Hazelwood MO 63042 > > > > This e-mail is intended for the addressee shown. Should you have received > it in error, please delete this message and contact the sender. This e-mail > and any attachments thereto may contain information that is > privileged, confidential or proprietary. Any review, dissemination or use > of this transmission or its contents by persons other than the addressee or > authorized employees of the intended organizations is strictly prohibited. > > > > > > _______________________________________________ > Python-porting mailing list > Python-porting at python.org > https://mail.python.org/mailman/listinfo/python-porting > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image010.png Type: image/png Size: 1467 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 1050 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image009.png Type: image/png Size: 1086 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 3206 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 1087 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image007.png Type: image/png Size: 1685 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.png Type: image/png Size: 4163 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image008.png Type: image/png Size: 1748 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 4011 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image006.png Type: image/png Size: 1758 bytes Desc: not available URL: From brett at python.org Wed Aug 23 11:00:42 2017 From: brett at python.org (Brett Cannon) Date: Wed, 23 Aug 2017 15:00:42 +0000 Subject: [Python-porting] Porting Problem In-Reply-To: References: Message-ID: I see two problems. One I don't know quite what this has to do with porting code to Python 3 since loaders are not defined in importlib in Python 2.7. Two, there is no importlib.Loader. There is https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.exec_module and some implementations of it in importlib, but your call signature doesn't match any of them. On Wed, Aug 23, 2017, 07:01 Lennart Regebro wrote: > What is it supposed to do, and what is the error message you get? > > On Thu, Aug 17, 2017 at 12:41 AM, Zepp, Robert wrote: > >> Please, >> >> >> >> How do I make the following line compile in 3.6 ? >> >> batchfile = importlib.Loader.exec_module(*'batch_file'*, TestScript_fd, >> FullFilePath, (*'.py'*, *'r'*, importlib.PY_SOURCE)) >> >> >> >> Thanks. >> >> >> >> Robert Zepp >> >> Senior Firmware Engineer >> >> [image: https://aclara.wpengine.com/sigb/images/aclara_primary_logo.png] >> >> >> [image: https://aclara.wpengine.com/sigb/images/index24_07.png] >> >> [image: https://aclara.wpengine.com/sigb/images/index24_08.png] >> >> [image: >> https://aclara.wpengine.com/sigb/images/aclara_connect_2018_logo.png] >> >> >> [image: https://aclara.wpengine.com/sigb/images/aclaraconnect_2018.png] >> >> >> [image: https://aclara.wpengine.com/sigb/images/linkedin.png] >> >> >> [image: https://aclara.wpengine.com/sigb/images/facebook.png] >> >> >> [image: https://aclara.wpengine.com/sigb/images/twitter.png] >> >> >> [image: https://aclara.wpengine.com/sigb/images/index24_14.png] >> >> [image: https://aclara.wpengine.com/sigb/images/index24_15.png] >> >> P: 314 895 6543 C: 314 807 6600 E: rzepp at aclara.com W: aclara.com >> A: 945 Hornet Drive, Hazelwood MO 63042 >> >> >> >> This e-mail is intended for the addressee shown. Should you have >> received it in error, please delete this message and contact the sender. >> This e-mail and any attachments thereto may contain information that is >> privileged, confidential or proprietary. Any review, dissemination or use >> of this transmission or its contents by persons other than the addressee or >> authorized employees of the intended organizations is strictly prohibited. >> >> >> >> >> >> _______________________________________________ >> Python-porting mailing list >> Python-porting at python.org >> https://mail.python.org/mailman/listinfo/python-porting >> >> > _______________________________________________ > Python-porting mailing list > Python-porting at python.org > https://mail.python.org/mailman/listinfo/python-porting > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image008.png Type: image/png Size: 1748 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image009.png Type: image/png Size: 1086 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 1087 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image006.png Type: image/png Size: 1758 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 3206 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 4011 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 1050 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image007.png Type: image/png Size: 1685 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.png Type: image/png Size: 4163 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image010.png Type: image/png Size: 1467 bytes Desc: not available URL: