Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #79229

Re: Import Doesn't Import

Path csiph.com!usenet.pasdenom.info!news.franciliens.net!news.muarf.org!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!hq-usenetpeers.eweka.nl!hq-usenetpeers.eweka.nl!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; '16,': 0.03; 'from:addr:yahoo.co.uk': 0.04; 'importerror:': 0.07; 'imply': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'throws': 0.09; 'python': 0.11; 'suggest': 0.14; 'language.': 0.14; 'it;': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'urllib': 0.16; 'language': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'module': 0.19; "python's": 0.19; 'thu,': 0.19; '>>>': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'looks': 0.24; 'right.': 0.26; 'header:X-Complaints-To:1': 0.27; 'van': 0.27; 'header:In-Reply- To:1': 0.27; "doesn't": 0.30; 'errors': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'requests': 0.31; 'libraries': 0.31; 'run': 0.32; 'url:python': 0.33; 'totally': 0.33; 'maybe': 0.34; "i'd": 0.34; "can't": 0.35; 'version': 0.36; 'url:listinfo': 0.36; 'url:org': 0.36; 'error.': 0.37; 'so,': 0.37; 'starting': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'expect': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'url:mail': 0.40; 'even': 0.60; 'no.': 0.61; 'our': 0.64; 'telling': 0.64; 'charset:windows-1252': 0.65; 'joel': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: Import Doesn't Import
Date Thu, 16 Oct 2014 23:56:03 +0100
References <1a3844da-b467-43ba-b34f-3aaa6442d799@googlegroups.com> <m1pdbm$rqi$1@ger.gmane.org> <CAPM-O+wXVcw4q3KB9pnw7UmRQ9mWLGD22vKufysJkbfeydHZRg@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host host-92-24-211-10.ppp.as43234.net
User-Agent Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
In-Reply-To <CAPM-O+wXVcw4q3KB9pnw7UmRQ9mWLGD22vKufysJkbfeydHZRg@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.14937.1413500178.18130.python-list@python.org> (permalink)
Lines 38
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1413500178 news.xs4all.nl 2856 [2001:888:2000:d::a6]:53024
X-Complaints-To abuse@xs4all.nl
X-Received-Body-CRC 869884217
X-Received-Bytes 4580
Xref csiph.com comp.lang.python:79229

Show key headers only | View raw


On 16/10/2014 23:28, Joel Goldstick wrote:
> On Thu, Oct 16, 2014 at 5:29 PM, Emile van Sebille <emile@fenx.com> wrote:
>> On 10/15/2014 5:40 PM, ryguy7272 wrote:
>>>
>>> ImportError: No module named 'urllib2'
>>> I'm telling Python to import because it doesn't exist and it throws an
>>> error.  I don't get it; I just don't get it.  If I'm working with R, I can
>>> import thousands of libraries with no errors whatsoever.  With Python, I
>>> just get thousands of errors with nothing working whatsoever.  I totally
>>> don't understand this language.  Import means import.  Right.  WTF!!!!!
>>
>>
>> So, maybe Import doesn't mean import -- perhaps you expect import to
>> retrieve content from the web and make it importable(1). That's not what
>> python's import does. Python's version looks for a local module to import.
>>
>> I'd suggest starting with the tutorial.
>>
>> Emile
>>
>>
>> (1) which would imply execution of arbitrary code.
>>
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>
> requests is a better choice than urllib
>

To an experienced user yes, to an inexperienced OP who can't even run a 
Python program without help a very emphatic no.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Import Doesn't Import ryguy7272 <ryanshuell@gmail.com> - 2014-10-15 17:40 -0700
  Re: Import Doesn't Import ryguy7272 <ryanshuell@gmail.com> - 2014-10-15 17:44 -0700
    Re: Import Doesn't Import Dan Stromberg <drsalists@gmail.com> - 2014-10-15 18:19 -0700
    Re: Import Doesn't Import Terry Reedy <tjreedy@udel.edu> - 2014-10-15 22:43 -0400
    Re: Import Doesn't Import Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-10-16 09:01 +0100
  Re: Import Doesn't Import Chris Angelico <rosuav@gmail.com> - 2014-10-16 11:54 +1100
  Re: Import Doesn't Import Dan Stromberg <drsalists@gmail.com> - 2014-10-15 18:12 -0700
  Re: Import Doesn't Import MRAB <python@mrabarnett.plus.com> - 2014-10-16 02:13 +0100
  Python 3 is the active language, recommended for newcomers (was: Import Doesn't Import) Ben Finney <ben+python@benfinney.id.au> - 2014-10-16 12:35 +1100
  Re: Import Doesn't Import Chris Rebert <clp2@rebertia.com> - 2014-10-15 18:21 -0700
  Re: Import Doesn't Import Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-10-15 22:11 -0400
  Re: Import Doesn't Import Emile van Sebille <emile@fenx.com> - 2014-10-16 14:29 -0700
  Re: Import Doesn't Import Joel Goldstick <joel.goldstick@gmail.com> - 2014-10-16 18:28 -0400
  Re: Import Doesn't Import Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-10-16 23:56 +0100

csiph-web