#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2014
    Posts
    1
    Rep Power
    0

    Question [Solved myself] Error from accessing function


    Hello, I'm very new to this, I've watched several videos now, learned some basics, but I still lack a lot of knowledge and now I've ran into a strange problem.

    When I'm trying to access "input" from a function it comes up with a hex error code, something like:
    Code:
    <function te at 0x000000000355BB70>
    To be more precise what I'm trying to accomplish is when I invoke a function, I want to get asked to input few things and then get them processed, but it seems that I'm getting stuck on the "input" part.

    Here is the code:
    Code:
    def te():
        name = input('Enter your name: ')
        print ('Hello ', name)
    So when I execute a script, and write te in the interpreter, it comes up with the hex error.

    I'm using the newest build that I've installed today:
    Code:
    >>> print (sys.version)
    3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AMD64)]
    My operating system: Win7, x64;
    P.S. "input" outside the function works just fine.

    Thanks in advance.

    EDIT:
    Okay, I'm just plain stupid, it does seem that I was not doing this properly, I should've wrote te() in the interpreter to load my function. Gosh, someone delete this shame... ; ))
    Last edited by h3xus; April 7th, 2014 at 04:48 PM. Reason: My bad
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,905
    Rep Power
    481
    The number written in hexadecimal is an address whereby python can find and execute the function.
    It is, I expect, the id(te)

    0x000000000355BB70

    It's not an error.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo