cannot create python packages

  • Thread starter Konstantinos Pachopoulos
  • Start date
K

Konstantinos Pachopoulos

Hi,
i have the following files:
current_dir/level1/Called.py
current_dir/Caller.py


Called.py:
-----------
class Called:
def exec1(self):
print "Hello"


Caller.py:
----------
from level1.Called import *

c=Called()
c.exec1()

However it is impossible for Caller.py to find
Called.py. I even tried to place the level1 structure
inside /usr/lib/pythonX.Y/, whithout success however.
Any ideas?

Thnx


___________________________________________________________
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html
 
M

mauro

Hi,
i have the following files:
current_dir/level1/Called.py
current_dir/Caller.py

Called.py:
-----------
class Called:
def exec1(self):
print "Hello"

Caller.py:
----------
from level1.Called import *

c=Called()
c.exec1()

However it is impossible for Caller.py to find
Called.py. I even tried to place the level1 structure
inside /usr/lib/pythonX.Y/, whithout success however.
Any ideas?

Thnx

___________________________________________________________
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html

I think you need a __init__.py file in level1 directory
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top