building a small calculator

Simon Brunning simon.brunning at gmail.com
Wed Apr 20 08:39:51 EDT 2005


On 20 Apr 2005 05:31:15 -0700, aleksander.helgaker at gmail.com
<aleksander.helgaker at gmail.com> wrote:
> I get the following error message when using the command sys.exit().
> 
> name 'sys' is not defined.

You really are new at this, aren't you? ;-) You need to import the sys
module before you use it. Put this at the top of your script:

import sys

I'd also suggest that you have a run through the tutorial -
<http://docs.python.org/tut/>. It's time well spent. If you don't get
on with that, there's another couple of tutorials available aimed
directly at those new to programming -
<http://www.livewires.org.uk/python/> and
<http://www.ibiblio.org/obp/thinkCSpy/>.

Lastly, although neophytes are more than welcome here, you might find
the tutor mailing list a good place to ask questions in the early days
of your Python experience. You'll find it here -
<http://mail.python.org/mailman/listinfo/tutor>.

-- 
Cheers,
Simon B,
simon at brunningonline.net,
http://www.brunningonline.net/simon/blog/



More information about the Python-list mailing list