Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79188
| X-Received | by 10.50.20.10 with SMTP id j10mr11405803ige.1.1413420240857; Wed, 15 Oct 2014 17:44:00 -0700 (PDT) |
|---|---|
| X-Received | by 10.140.94.242 with SMTP id g105mr256366qge.0.1413420240511; Wed, 15 Oct 2014 17:44:00 -0700 (PDT) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!uq10no11527561igb.0!news-out.google.com!i10ni91qaf.0!nntp.google.com!dc16no3159234qab.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.python |
| Date | Wed, 15 Oct 2014 17:44:00 -0700 (PDT) |
| In-Reply-To | <1a3844da-b467-43ba-b34f-3aaa6442d799@googlegroups.com> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=74.108.111.24; posting-account=QHCkKAoAAAAtwxtoSlGaj-ksHegzSKUu |
| NNTP-Posting-Host | 74.108.111.24 |
| References | <1a3844da-b467-43ba-b34f-3aaa6442d799@googlegroups.com> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <20f25f12-d376-4b78-9fb4-e877e2fcde15@googlegroups.com> (permalink) |
| Subject | Re: Import Doesn't Import |
| From | ryguy7272 <ryanshuell@gmail.com> |
| Injection-Date | Thu, 16 Oct 2014 00:44:00 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| X-Received-Bytes | 3191 |
| X-Received-Body-CRC | 880557490 |
| Xref | csiph.com comp.lang.python:79188 |
Show key headers only | View raw
On Wednesday, October 15, 2014 8:40:40 PM UTC-4, ryguy7272 wrote:
> So sorry everyone. I've posted here several times today. This is VERY frustrating.
>
>
>
> So, I'm reading this link.
>
> https://docs.python.org/2/howto/urllib2.html
>
>
>
>
>
> Fetching URLs
>
> The simplest way to use urllib2 is as follows:
>
> import urllib2
>
> response = urllib2.urlopen('http://python.org/')
>
> html = response.read()
>
>
>
>
>
> So, I fire up Python, and create a new file and name it and hit F5.
>
>
>
> All I have is thins in the file:
>
> import urllib2
>
> response = urllib2.urlopen('http://python.org/')
>
> html = response.read()
>
>
>
> It immediately produces this error:
>
> Traceback (most recent call last):
>
> File "C:/Python34/import_web_data.py", line 1, in <module>
>
> import urllib2
>
> ImportError: No module named 'urllib2'
>
>
>
>
>
> 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!!!!!
Either this is the most brilliant thing ever invented, or it's the biggest piece of shit ever invented. I just can't tell. All I know for sure, is that it doesn't do ANYTHING that I tell it to do.
If there is another way of running Python code, like using Visual Studio, or a text file, or some such thing, let me know, and I'll do it. It seems like you should use Python to run Python, but my Python doesn't do anything at all. Yesterday I uninstalled Python 2.7, because that wouldn't do anything either. I'm just about ready to uninstall 3.4.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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