[issue31318] Windows importlib.util.find_spec("re") results in AttributeError: module 'importlib' has no attribute 'util'
New submission from elmar:
Hi There,
I found the following bug, but have now idea where to search to fix this:
On Windows calling a python script from the command line with the line
importlib.util.find_spec("re") in it or using the standard python shell
and executing importlib.util.find_spec("re") causes an AttributeError: module
'importlib' has no attribute 'util'.
Surprisingly using ipython and calling the same script with %run or executing
importlib.util.find_spec("re") in the ipython shell works fine.
C:\Users\buchere>python
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import importlib
>>> importlib.util.find_spec("re")
Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'importlib' has no attribute 'util'
>>> exit()
ipython:
C:\Users\buchere>ipython
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)]
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import importlib
In [2]: importlib.util.find_spec("re")
Out[2]: ModuleSpec(name='re', loader=<_frozen_importlib_external.SourceFileLoade
r object at 0x01EB6750>, origin='c:\\users\\buchere\\appdata\\local\\programs\\p
ython\\python36-32\\lib\\re.py')
In [3]:
The same code works fine in the Darwin and Linux standard python shell.
This error is really specific to the Windows standard python shell.
--
messages: 301083
nosy: bue
priority: normal
severity: normal
status: open
title: Windows importlib.util.find_spec("re") results in AttributeError: module
'importlib' has no attribute 'util'
___
Python tracker
<http://bugs.python.org/issue31318>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31318] On Windows importlib.util.find_spec("re") results in AttributeError: module 'importlib' has no attribute 'util'
Changes by elmar :
--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
title: Windows importlib.util.find_spec("re") results in AttributeError: module
'importlib' has no attribute 'util' -> On Windows
importlib.util.find_spec("re") results in AttributeError: module 'importlib'
has no attribute 'util'
type: -> compile error
versions: +Python 3.6
___
Python tracker
<http://bugs.python.org/issue31318>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31318] On Windows importlib.util.find_spec("re") results in AttributeError: module 'importlib' has no attribute 'util'
elmar added the comment: thank you Steve for the explanation! I was not aware that I should import sub modules explicitly like this. especial because it worked on my development machine without doing so. now I know. Elmar -- ___ Python tracker <http://bugs.python.org/issue31318> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13075] PEP-0001 contains dead links
New submission from Elmar Zander : The links in section "Resources" of PEP-0001 are all dead. They point to www.python.org/dev/ and all return a 404. Most of them can still be found via google archive.org, but that's not really how it should be. Maybe some of them are already superseded, but even then I think they have at least historical value and should be kept on python.org. -- assignee: docs@python components: Documentation messages: 144680 nosy: docs@python, ezander priority: normal severity: normal status: open title: PEP-0001 contains dead links ___ Python tracker <http://bugs.python.org/issue13075> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40250] unable to comment out r'\u' string with triple quote marks
New submission from Elmar Bucher :
When I try to comment out this little code by triple quotation,
I run into
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in
position 29-30: truncated \u escape
ls_tex = []
ls_tex.append(r'\usepackage{mathtools}')
print(ls_tex)
Basically it is not possible to use r'\u' and comment it out with ''' or """. I
think this should not be the case, this is an interpreter error.
------
components: Interpreter Core
messages: 366166
nosy: Elmar Bucher
priority: normal
severity: normal
status: open
title: unable to comment out r'\u' string with triple quote marks
versions: Python 3.7
___
Python tracker
<https://bugs.python.org/issue40250>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40250] unable to comment out r'\u' string with triple quote marks
Change by Elmar Bucher : -- type: -> compile error ___ Python tracker <https://bugs.python.org/issue40250> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
