[Tutor] total beginner stuff

Kent Johnson kent37 at tds.net
Fri Feb 15 21:14:01 CET 2008


Toby wrote:
> I’ve been doing the tutorials online and learning on my own for less 
> than a week (not sure if I’ll get blasted for posting questions this 
> soon or not but here goes):

We don't do much blasting around here, don't worry!

> I’ve tried to do some of the online tutorials but they are ALL similar 
> and quickly bypass very basic questions that I’m having difficulty 
> getting past.  First off they all want you into interactive mode quickly 
> and it took some time for me to realize why… once I tried using files 
> created in text editors to run code nothing worked!

Specific details are helpful. It's hard to help with "nothing worked". 
It's much easier if you tell us in detail what you tried and what 
happened. Start with the simplest thing that is giving you trouble and 
we'll go from there.

>  I’ve run across 
> some tutorials that use for example input() which for whatever reason 
> isn’t built into the language??? It just errors out on me and when I 
> remove the input() function it works, well not really works but it 
> doesn’t error out on me anymore.

input() is built into the language. It helps us a lot if you can show 
the specific error message, including the traceback. Just copy/paste the 
whole thing into your email.

input() asks you for input at the console; possibly you are running your 
programs in a way that there is no console available? Again, details 
would help.

>  There were others like math (which I 
> realized you have to import from somewhere else, still no clue where 
> unless it just works because it does) but this is really causing me a 
> lot of headaches because clearly I missed something pretty basic.

You don't really have to understand the details of where files are 
imported from yet.

> Is there some files or libraries that I need to download and do a from 
> whatever import *  in order to use a lot of what you guys would consider 
> basic functions?

No, input() and "import math" should both work out of the box.

> Again, blast me if you wish but please do point me to the correct place 
> to take care of this issue as I’m really interested in learning python 
> but I have as yet to find somewhere that explains this seemingly simple 
> step (I’ve even tried using idle in hopes it would magically import 
> everything I need, and currently am downloading eclipse with the pydev 
> plug-in from sourceforge)

This is a good place for your questions. Take a deep breath, back up to 
where you were when you first started having trouble and let us know 
what you tried.

Kent


More information about the Tutor mailing list