Re: Import Doesn't Import

2014-10-16 Thread Mark Lawrence
On 16/10/2014 23:28, Joel Goldstick wrote: 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 i

Re: Import Doesn't Import

2014-10-16 Thread Joel Goldstick
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 >

Re: Import Doesn't Import

2014-10-16 Thread Emile van Sebille
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,

Re: Import Doesn't Import

2014-10-16 Thread Mark Lawrence
On 16/10/2014 01:44, ryguy7272 wrote: If you carry on using this approach and you continue using the buggy google groups interface you're unlikely to make many friends. May I suggest that before posting you spend a few minutes doing some research as Python has been in use for 22 years so your

Re: Import Doesn't Import

2014-10-15 Thread Terry Reedy
Perhaps you are trying too hard too fast. When I started Python, after 20 years of on and off experience with multiple languages, I went through the tutorial (on Dos, no Idle). It took about 2 hours. Then I quickly wrote the code I needed for a paid project. Do stick with 3.4.2, but use the 3.4

Re: Import Doesn't Import

2014-10-15 Thread Chris Rebert
On Wednesday, October 15, 2014, 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 > > Important note!: The "/2/" in the URL means those docs are for Python 2.x Wh

Python 3 is the active language, recommended for newcomers (was: Import Doesn't Import)

2014-10-15 Thread Ben Finney
ryguy7272 writes: > So, I'm reading this link. > https://docs.python.org/2/howto/urllib2.html Note that this is the documentation for Python 2, which is obsolescent. It has had a long life, so references to Python on the web are still dominantly about that legacy version. Your confusion is quite

Re: Import Doesn't Import

2014-10-15 Thread Dan Stromberg
On Wed, Oct 15, 2014 at 5:44 PM, ryguy7272 wrote: > 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. Maybe you should decide whether you wan

Re: Import Doesn't Import

2014-10-15 Thread MRAB
On 2014-10-16 01:40, 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

Re: Import Doesn't Import

2014-10-15 Thread Dan Stromberg
On Wed, Oct 15, 2014 at 5:40 PM, ryguy7272 wrote: > > ImportError: No module named 'urllib2' http://stackoverflow.com/questions/2792650/python3-error-import-error-no-module-name-urllib -- https://mail.python.org/mailman/listinfo/python-list

Re: Import Doesn't Import

2014-10-15 Thread Chris Angelico
On Thu, Oct 16, 2014 at 11:40 AM, ryguy7272 wrote: > I totally don't understand this language. Import means import. Right. > WTF! Yes, but import from where? If you ask Python - or any other language - to "import asfadgt4tfihavzcxvzxcvaerg", do you expect it to succeed? It doesn't exist.

Re: Import Doesn't Import

2014-10-15 Thread ryguy7272
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

Import Doesn't Import

2014-10-15 Thread ryguy7272
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 = respon

Re: from calendar import* doesn't import everything

2012-04-24 Thread Kiuhnm
On 4/25/2012 1:54, Rotwang wrote: On 25/04/2012 00:42, Kiuhnm wrote: On 4/25/2012 1:18, Rotwang wrote: Sorry if this is a stupid question, but what is up with this: >>> from calendar import* >>> Calendar Traceback (most recent call last): File "", line 1, in Calendar NameError: name 'Calendar

Re: from calendar import* doesn't import everything

2012-04-24 Thread Justin Ezequiel
see http://docs.python.org/tutorial/modules.html#importing-from-a-package http://stackoverflow.com/questions/2187583/whats-the-python-all-module-level-variable-for I know the 1st link is for importing from a package but the same applies for modules -- http://mail.python.org/mailman/listinfo/pytho

Re: from calendar import* doesn't import everything

2012-04-24 Thread Rotwang
On 25/04/2012 00:42, Kiuhnm wrote: On 4/25/2012 1:18, Rotwang wrote: Sorry if this is a stupid question, but what is up with this: >>> from calendar import* >>> Calendar Traceback (most recent call last): File "", line 1, in Calendar NameError: name 'Calendar' is not defined >>> from

Re: from calendar import* doesn't import everything

2012-04-24 Thread Kiuhnm
On 4/25/2012 1:18, Rotwang wrote: > Sorry if this is a stupid question, but what is up with this: > > >>> from calendar import* > >>> Calendar > > Traceback (most recent call last): > File "", line 1, in > Calendar > NameError: name 'Calendar' is not defined > >>> from calendar import Calenda

Re: from calendar import* doesn't import everything

2012-04-24 Thread Tim Chase
On 04/24/12 18:18, Rotwang wrote: Sorry if this is a stupid question, but what is up with this: >>> from calendar import* >>> Calendar Traceback (most recent call last): File "", line 1, in Calendar NameError: name 'Calendar' is not defined >>> from calendar import Calendar