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

    Join Date
    Mar 2005
    Location
    US
    Posts
    30
    Rep Power
    10

    Modules/Importing


    Well, I'm having some problems using modules in Python. I've done a few searches to no avail. I make the module from the tutorial on python.org (fibo.py) and I save the file in the lib folder. In the CMD I import the file, and no errors come up, but I am unable to use any functions made in the file. Any help, links, or other things are much appreciated.
  2. #2
  3. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    Hi Eric
    In IDLE type :
    import fibo
    then type
    dir(fibo)
    You should see a list functions in fibo:

    [ fib,fib2 ]

    If that works then type:
    fibo.fib(10)

    Let us know at which stage you get errors and we can help you more.

    Happy hacking and welcome to python.


    grim
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2005
    Location
    US
    Posts
    30
    Rep Power
    10
    Ah, works. Thanks for the help.

IMN logo majestic logo threadwatch logo seochat tools logo