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


Groups > comp.lang.python > #79228

Re: Import Doesn't Import

References <1a3844da-b467-43ba-b34f-3aaa6442d799@googlegroups.com> <m1pdbm$rqi$1@ger.gmane.org>
Date 2014-10-16 18:28 -0400
Subject Re: Import Doesn't Import
From Joel Goldstick <joel.goldstick@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.14936.1413498515.18130.python-list@python.org> (permalink)

Show all headers | View raw


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


-- 
Joel Goldstick
http://joelgoldstick.com

Back to comp.lang.python | Previous | Next — Previous in thread | Next 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