[issue25980] not able to find module request in lib urllib - Python35-32

2015-12-30 Thread Brett Cannon

Brett Cannon added the comment:

You need to use the line `import urllib.request` to make the import work as you 
didn't import the urllib.request module, only the urllib package.

--
nosy: +brett.cannon
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25980] not able to find module request in lib urllib - Python35-32

2015-12-30 Thread Kiran Kotari

New submission from Kiran Kotari:

Python 3.5.1 documentation code giving following error:

Error: 
Traceback (most recent call last):
  File ".\urllib1.py", line 5, in 
with urllib.request.urlopen('http://www.py4inf.com/code/romeo.txt') as f:
AttributeError: module 'urllib' has no attribute 'request'

Python Code:

import urllib
with urllib.request.urlopen('http://www.py4inf.com/code/romeo.txt') as f:
print(f.read())

--
components: Library (Lib)
messages: 257230
nosy: Kiran Kotari
priority: normal
severity: normal
status: open
title: not able to find module request in lib urllib - Python35-32
type: behavior
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25980] not able to find module request in lib urllib - Python35-32

2015-12-30 Thread R. David Murray

R. David Murray added the comment:

Can you provide a link to the documentation you find to be in error?

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com