+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
Coding Thread, Python/GAE import modules issue? in Coding and Web Development; In main.py you have written: Code: import displayMe.outputText This is incorrect usage of the python import statement, you either must ...
  1. #16

    Join Date
    Jul 2005
    Location
    Rugby
    Posts
    432
    Thank Post
    17
    Thanked 66 Times in 61 Posts
    Rep Power
    35
    In main.py you have written:
    Code:
    import displayMe.outputText
    This is incorrect usage of the python import statement, you either must import the entire module using "import displayMe" and then call functions with displayMe.outputText; or import functions with "from displayMe import outputText, *additional_function*" and call the functions by JUST function name.

    Matt

  2. #17

    Join Date
    Jul 2005
    Location
    Rugby
    Posts
    432
    Thank Post
    17
    Thanked 66 Times in 61 Posts
    Rep Power
    35
    Attached is the sample app that I created, for reference.

    testapp.zip

    Matt

  3. #18

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,623
    Thank Post
    514
    Thanked 2,442 Times in 1,890 Posts
    Blog Entries
    24
    Rep Power
    831
    OK. I now have it working. It appears that this is a bug with Python 2.5, which their site links to, instead of linking to the latest Python MSI in the 2.5 series - 2.5.4.

    Remove 2.5 and put 2.5.4 on and it works fine.

  4. #19

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,623
    Thank Post
    514
    Thanked 2,442 Times in 1,890 Posts
    Blog Entries
    24
    Rep Power
    831
    Quote Originally Posted by saundersmatt View Post
    In main.py you have written:
    Code:
    import displayMe.outputText
    This is incorrect usage of the python import statement, you either must import the entire module using "import displayMe" and then call functions with displayMe.outputText; or import functions with "from displayMe import outputText, *additional_function*" and call the functions by JUST function name.

    Matt
    Not according to a bunch of sites I've read. However, the problem was, the from blah import blah method was failing too.

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Photoshop Elements Photo Browser issue.
    By mseaney in forum Educational Software
    Replies: 1
    Last Post: 17th January 2006, 12:02 PM
  2. Synchronise Files issue.....Mystery
    By tosca925 in forum Windows
    Replies: 3
    Last Post: 13th January 2006, 10:31 AM
  3. Linux Format, January Issue
    By kingswood in forum *nix
    Replies: 11
    Last Post: 5th December 2005, 11:02 AM
  4. Exchange 2003 and Server 2003 SP1 issue.
    By tosca925 in forum Windows
    Replies: 0
    Last Post: 21st August 2005, 10:32 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •