No module named ...

Discussion in 'Python' started by gtb, Mar 20, 2007.

  1. gtb

    gtb Guest

    I was having trouble with the 'no module named' error message when
    trying to import and noticed that other successful imports were
    pulling from .py files that had the dot replaced with $ and .class
    appended to the name. Actually in one case it picked up a .pyc file
    then created a .class file.

    How do I create a .class file from my .py file so that functions can
    be imported.


    Thanx,

    gtb
     
    gtb, Mar 20, 2007
    #1
    1. Advertisements

  2. gtb wrote:
    > I was having trouble with the 'no module named' error message when
    > trying to import and noticed that other successful imports were
    > pulling from .py files that had the dot replaced with $ and .class
    > appended to the name. Actually in one case it picked up a .pyc file
    > then created a .class file.
    >
    > How do I create a .class file from my .py file so that functions can
    > be imported.


    Sounds like a Jython implementation detail, like CPython's .pyc files.
    Those files should presumably be created automatically the first time
    your module is imported. The problem importing your module is probably
    caused by something else, like an incorrect sys.path.
     
    Leif K-Brooks, Mar 21, 2007
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. K
    Replies:
    8
    Views:
    598
    W Isaac Carroll
    Jul 11, 2003
  2. Harry George
    Replies:
    0
    Views:
    5,964
    Harry George
    Jul 15, 2003
  3. Carsten Gehling

    pso - ImportError: No module named url

    Carsten Gehling, Jul 16, 2003, in forum: Python
    Replies:
    0
    Views:
    526
    Carsten Gehling
    Jul 16, 2003
  4. Carsten Gehling

    SV: pso - ImportError: No module named url

    Carsten Gehling, Jul 16, 2003, in forum: Python
    Replies:
    0
    Views:
    626
    Carsten Gehling
    Jul 16, 2003
  5. Duane Voth

    No module named _curses (RedHat 7)

    Duane Voth, Aug 1, 2003, in forum: Python
    Replies:
    0
    Views:
    1,507
    Duane Voth
    Aug 1, 2003
  6. eric_bellard
    Replies:
    1
    Views:
    5,491
    CarlosRivera
    Oct 7, 2004
  7. Maric Michaud
    Replies:
    0
    Views:
    7,332
    Maric Michaud
    Jun 24, 2006
  8. process
    Replies:
    1
    Views:
    1,383
    Robert Kern
    Oct 17, 2008
Loading...