calling a function from a module in a class

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 360monkey
    New Member
    • Feb 2010
    • 17

    calling a function from a module in a class

    I recently tried to start learning GUI for python, and reverted back to python 2.6.4

    my question:

    in python 3.1.1,:
    >>>import title
    >>>title.class. function()
    >>>running program

    in python 2.6.4:
    >>>import title #working fine
    >>>title.class. function()
    then I get this:
    unbound method must be called with class instance 1st argument
  • vintello
    New Member
    • Feb 2010
    • 5

    #2
    in python 2.6 use
    example :
    from time import sleep
    sleep(0.2)

    for you:

    from title import class
    class.function( )

    It`s mast work

    Comment

    • 360monkey
      New Member
      • Feb 2010
      • 17

      #3
      Thank you! this will make the message 20 characters!
      I don't know what id do without this reply!
      Arigatou Gozaimasu

      Comment

      Working...