Hello, currently I am writing an application that will run a daemon. However I am stuck:
What I have so far: created a project called "ihe", with an app called "devices". Inside devices there is "admin.py", "forms.py", "__init__.py", "models.py", "urls.py", "views.py". There are also several directories: "configuration" contains "config.py", "__init__.py" and "logging.conf", the "daemons" directory contains the daemons that I want to execute. A standard "managment" directory containing the management calls. And lastly a "utilities" direcotry containing "hwcontrol.py" and "utils.py". My issue is that if I want to for instance import hwutils which is pure python inside a daemon or a "from devices.models import *" inside a daemon or any other file it always complains about an import error: "Traceback (most recent call last): File "database.py", line 14, in <module> from devices.models import * ImportError: No module named devices.models" "Traceback (most recent call last): File "database.py", line 14, in <module> from devices.utilities import hwcontrol "ImportError: No module named devices.utilities" If I understand correctly this is because of the python path. For instance the pythonpath for a daemon: ['/~/software/ihe/devices/daemons', '/usr/lib/portage/pym', '/usr/lib64/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7/site-packages', '/usr/lib64/python2.7/site-packages/Orange/orng', '/usr/lib64/python2.7/site-packages/PIL', '/usr/lib64/python2.7/site-packages/gst-0.10', '/usr/lib64/python2.7/site-packages/gtk-2.0', '/usr/lib64/python2.7/site-packages/wx-2.8-gtk2-unicode', '/usr/lib64/portage/pym'] However I thought that if I put the files inside the django project that the imports would then work. What do I have to do to get it working? Thank you for any help. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.