Re: first post: new to pythong. some questions.

2005-12-08 Thread Simon Brunning
On 12/8/05, shawn a <[EMAIL PROTECTED]> wrote:
> Hello. Im brand new to this list and to python.  Ive recently started
> reading about it
>   and am now in the tinkering stage.

Welcome to Python!

>  I have a script im working on that i
> need some
>  asistance debugging. Its super small and should be a snap for you gurus =)
>
>  I have 2 files in a dir off my home dir:
>  mkoneurl.py
>  make_ou_class.py
>
>  --mkoneurl.py--
>  #! /usr/bin/env python
>
>  import make_ou_class
>
>  run = makeoneurl()

You need:

run = make_ou_class.makeoneurl()

See  for why.

(BTW, you would probably have got more of a response with a better
subject line.  is
worth a read.)

--
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
-- 
http://mail.python.org/mailman/listinfo/python-list


first post: new to pythong. some questions.

2005-12-07 Thread shawn a
Hello. Im brand new to this list and to python.  Ive recently started reading about it
 and am now in the tinkering stage.  I have a script im working on that i need some
asistance debugging. Its super small and should be a snap for you gurus =)

I have 2 files in a dir off my home dir:
mkoneurl.py
make_ou_class.py

--mkoneurl.py--
#! /usr/bin/env python

import make_ou_class

run = makeoneurl()
-

--make_ou_class.py--
class makeoneurl:
    def __init__():
    self.commandline()

    def commandline():
    com = str(raw_input(":"))
   
#Parse out any params and aguements - reg expressions
    #params[] array to hold paramters
    params = 0
    if com == "ou":
   
self.ou(params)
    else:
   
print com + " unknown command."

    def ou(parameter):
    print "hello world"
    self.commandline():
---

Why i run mkoneurl.py by typing "python mkonurl.py" i  get the following error:
 Traceback (innermost last):
   File "mkoneurl.py", line 5, in ?
 run = makeoneurl()
 NameError: makeoneurl

am i missing something here? Any help would be greatly appreciated. Thank you

--Shawn




-- 
http://mail.python.org/mailman/listinfo/python-list