Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #10741

python import error, what's wrong?

Date 2011-08-02 23:52 +0800
Subject python import error, what's wrong?
From smith jack <thinke365@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1783.1312300365.1164.python-list@python.org> (permalink)

Show all headers | View raw


I am using pydev plugin in eclipse, all things works just as well
but now i have confronted with a confusing problem, that is i can
import a module write by myself successfully, but when i try to run
this program,
error just shows up, what's wrong?

the directory structure is as follows:

src
  org.test
      A.py
  org.lab
      B.py


contents of A seems like:
class A
    ...

contents of B seems like:                  // I try to run B.py,
python import error just appears, why?

from org.test.A import A
a = A()

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

python import error, what's wrong? smith jack <thinke365@gmail.com> - 2011-08-02 23:52 +0800
  Re: python import error, what's wrong? Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2011-08-03 09:14 +0200
    Re: python import error, what's wrong? Ben Finney <ben+python@benfinney.id.au> - 2011-08-03 17:45 +1000

csiph-web