Pydev wont import sources from another projec

debuti
2009-09-09
2013-03-15
  • debuti

    debuti - 2009-09-09

    Hello!

    Im trying to add the sources from another project (a library) to my project. I follow this guide (http://pydev.org/manual_101_project_conf2.html) i added the other projects and everything and it wont work :(

    I hope you could help me :) my code
    <code>
    #!/usr/bin/env python
    ###############################################################################################
    #  Author:
    _author = '<a href="mailto:debuti@gmail.com">Borja Garcia</a>'
    # Program:
    _name = 'synchers'
    # Descrip:
    _description = '''This scripts sync all data between devices'''
    # Version:
    _version = '0.0.0'
    #    Date:
    _date = '2009-05-18:11:51:43'
    # License: This script doesn't require any license since it's not intended to be redistributed.
    #          In such case, unless stated otherwise, the purpose of the author is to follow GPLv3.
    # History: 0.0.0 (YYYY-MM-DD:hh:mm)
    #            -Initial release
    ###############################################################################################

    # imports
    import logging
    import sys
    import doctest
    import datetime, time
    import os
    import subprocess
    import optparse
    import inspect

    # User-libs imports
    LIB_PATH = 'lib'
    sys.path.append(LIB_PATH)
    print sys.path

    from Utils.shellutils import *
    </code>

    and the obvious error
    Traceback (most recent call last):
      File "/media/data/Projects/workarea/Software/synchers/synchers.py", line 34, in <module>
        from Utils.shellutils import *
    ImportError: No module named Utils.shellutils
    ['/media/data/Projects/workarea/Software/synchers', '/usr/lib/python2.6', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/plat-linux2', '/usr/local/lib/python2.6/dist-packages', '/var/lib/python-support/python2.6', '/var/lib/python-support/python2.6/gtk-2.0', '/var/lib/python-support/python2.6/pyinotify', 'lib']

    im using eclipse 3.2.2 with pydev 1.4.8 in ubuntu 9.04

     
    • debuti

      debuti - 2009-09-09

      i upgraded to the latest versions of everything and the same! :(

      maybe the problem is that im not importing correctly...

       
    • debuti

      debuti - 2009-09-09

      ok! i reread the manual and i added the sources to a sources dir. Then the whole thing worked! :)

      Now i wonder if its any way to automaticly deploy my project to be portable (copy the libraries in a /lib folder or something)...

      do you know?

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks