Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; '16,': 0.03; 'importerror:': 0.07; 'imply': 0.09; 'throws': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'suggest': 0.14; 'language.': 0.14; 'it;': 0.16; 'urllib': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'module': 0.19; "python's": 0.19; 'thu,': 0.19; 'import': 0.22; 'cc:addr:python.org': 0.22; 'looks': 0.24; 'cc:2**0': 0.24; 'right.': 0.26; 'van': 0.27; 'header:In-Reply- To:1': 0.27; "doesn't": 0.30; 'errors': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'requests': 0.31; 'libraries': 0.31; 'url:python': 0.33; 'totally': 0.33; 'maybe': 0.34; "i'd": 0.34; 'received:google.com': 0.35; 'version': 0.36; 'url:listinfo': 0.36; 'url:org': 0.36; 'error.': 0.37; 'so,': 0.37; 'starting': 0.37; 'pm,': 0.38; 'expect': 0.39; 'url:mail': 0.40; 'telling': 0.64; 'joel': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=nfKWgvnJiE9rfUtQAAaMnDRRb2duq1nobvh0Z6y9hXg=; b=DzmAORWXQgwf/u8Nd0dWsxDxhu4ng3C7r/WckS7vB+DUetwLf+nFUj+Cm95B+jEswE 0ItN1B7U5JXfY01tSfZ1NQco8L3z+mSibE7fBr8QnwjXHjcVVraV3RzyXt/ZeuF1om6Q bxiPgZ9XrOrU+25D0iteOg8rxP1sT4f3PcPGFN1hMDKucYOKwGhQqBRn6+572SwaOhMV loYyvOG7HMeqf1cnubU8Vsmt9EcrpNdflPULEv3a+7b75i61RtN9KAAgJYvKgkkmVXxK K/AillF6JjBXrxe8+ghMfSY59QHcRi06hvOhwuUDWPikibpDXcbR0T+gEVLdDOwJtdrF wCCw== MIME-Version: 1.0 X-Received: by 10.140.96.165 with SMTP id k34mr6385846qge.33.1413498506674; Thu, 16 Oct 2014 15:28:26 -0700 (PDT) In-Reply-To: References: <1a3844da-b467-43ba-b34f-3aaa6442d799@googlegroups.com> Date: Thu, 16 Oct 2014 18:28:26 -0400 Subject: Re: Import Doesn't Import From: Joel Goldstick Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1413498515 news.xs4all.nl 2962 [2001:888:2000:d::a6]:49707 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79228 On Thu, Oct 16, 2014 at 5:29 PM, Emile van Sebille 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 -- Joel Goldstick http://joelgoldstick.com