[Python-porting] Porting Problem

Brett Cannon brett at python.org
Wed Aug 23 11:00:42 EDT 2017


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 <regebro at gmail.com> 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 <rzepp at aclara.com> 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]
>> <http://aclara.com/>
>>
>> [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]
>> <http://go.aclara.com/aclaraconnect2018-save-the-date>
>>
>> [image: https://aclara.wpengine.com/sigb/images/aclaraconnect_2018.png]
>> <http://go.aclara.com/aclaraconnect2018-save-the-date>
>>
>> [image: https://aclara.wpengine.com/sigb/images/linkedin.png]
>> <https://www.linkedin.com/company-beta/372610/>
>>
>> [image: https://aclara.wpengine.com/sigb/images/facebook.png]
>> <https://www.facebook.com/aclarasolutions/?hc_ref=SEARCH&fref=nf>
>>
>> [image: https://aclara.wpengine.com/sigb/images/twitter.png]
>> <https://twitter.com/AclaraSolutions>
>>
>> [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: <http://mail.python.org/pipermail/python-porting/attachments/20170823/68722c92/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 1748 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-porting/attachments/20170823/68722c92/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image009.png
Type: image/png
Size: 1086 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-porting/attachments/20170823/68722c92/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 1087 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-porting/attachments/20170823/68722c92/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 1758 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-porting/attachments/20170823/68722c92/attachment-0013.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 3206 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-porting/attachments/20170823/68722c92/attachment-0014.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 4011 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-porting/attachments/20170823/68722c92/attachment-0015.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1050 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-porting/attachments/20170823/68722c92/attachment-0016.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 1685 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-porting/attachments/20170823/68722c92/attachment-0017.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 4163 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-porting/attachments/20170823/68722c92/attachment-0018.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image010.png
Type: image/png
Size: 1467 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-porting/attachments/20170823/68722c92/attachment-0019.png>


More information about the Python-porting mailing list