strange problem using modules from my own package.

Discussion in 'Python' started by krishnakant Mane, Feb 8, 2007.

  1. hello all,
    I found a very strange kind of behaviour in python with my own package.
    I created a package in which there were 4 modules and one __init__.py file
    I created the entire project in eclipse (pydev).
    it works fine there with the ide.
    but now when I try running the code without eclipse, that is when I
    run the individual .py file from a command promt it gives me error.
    for example I have mainwindow.py, customer.py, stock.py and of course
    __init__p.py in my package
    the app is in wxpython which is not important in the context of this problem.
    never the less I go in the directory called pbcf which is the name of
    my package
    there I have all the above mentioned files and the mainwindow.py file
    is the one I run for testing all the menus.
    but here the moment I run the file, it starts giving me an error
    saying pbcf is not a module.
    I find that the same code runs without any problem in eclipse.
    in mainwindow.py I have from pbcf import * and in __init__.py I have
    of course included MySQLdb and wx
    and in __init__.py I have a connection object called CONCSS.
    now when I have all the imports in mainwindow, it does work in eclipse
    but does not on a normal command prompt.
    why is this?
    regards.
    Krishnakant.
    krishnakant Mane, Feb 8, 2007
    #1
    1. Advertising

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. Stefan Siegl
    Replies:
    1
    Views:
    757
  2. Saverio M.
    Replies:
    0
    Views:
    499
    Saverio M.
    Jul 3, 2006
  3. Dave
    Replies:
    2
    Views:
    453
  4. Sam Simmons
    Replies:
    1
    Views:
    200
    Sam Simmons
    Jan 22, 2012
  5. David Filmer
    Replies:
    17
    Views:
    248
    J. Romano
    Aug 18, 2004
Loading...

Share This Page