TypeError: no arguments expected

shawn a boris317 at gmail.com
Sun Dec 11 22:00:55 EST 2005


I havet these 2 files in the same dir. This is code im writing to learn pythong
mkoneurl.py:
#! /usr/bin/env python

import make_ou_class

run = make_ou_class.makeoneurl()

====================================
make_ou_class.py:

class makeoneurl:
        def __init__():
                self.commandline()

        def commandline():
                com = 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(params):
                print "hello world"
                self.commandline()

===============================================
when i run the script like this: python mkoneurl.py
I get this error:

Traceback (innermost last):
  File "mkoneurl.py", line 5, in ?
    run = make_ou_class.makeoneurl()
TypeError: no arguments expected

Ive looked around for this exeption but nothing ive read has help in
this situation.
Any of your thoughts are greatly apprectiated. THANK!!

--shawn



More information about the Python-list mailing list