Thread: [Pydev-users] Problem with PyDev and pysmbc
Brought to you by:
fabioz
From: Moritz S. <ma...@mo...> - 2011-09-18 13:40:23
|
Hi! I'm using PyDev 2.2.2.20 in Eclipse 3.7.0 and my code imports pysmbc (libsmbclient bindings for python - http://pypi.python.org/pypi/pysmbc - C module). Everything works finde, but PyDev marks the line import smbc as Unresolved Import, although I've added ít to the PYTHONPATH in project settings and in Interpreter settings (and the code works fine, if I run it in Eclipse console). Could this be because pysmbc is a C-module which is compiled natively? But the egg-zip-archive contains py-files, too! Archive: pysmbc-1.0.11.1-py2.7-linux-i686.egg Length Date Time Name --------- ---------- ----- ---- 38498 08-26-2011 13:46 smbc.so 514 08-26-2011 13:46 smbc.pyc 274 08-26-2011 13:46 smbc.py 1797 08-26-2011 13:46 EGG-INFO/PKG-INFO 1 08-26-2011 13:46 EGG-INFO/zip-safe 395 08-26-2011 13:46 EGG-INFO/SOURCES.txt 8 08-26-2011 13:46 EGG-INFO/native_libs.txt 5 08-26-2011 13:46 EGG-INFO/top_level.txt 1 08-26-2011 13:46 EGG-INFO/dependency_links.txt --------- ------- 41493 9 files Could someone help me with this? Regards -- Moritz Schlarb |
From: Fabio Z. <fa...@gm...> - 2011-09-18 18:13:23
|
2 things: 1. The current pydev has a problem dealing with zipped files (updating to the latest nightly should fix that -- you may need to reconfigure your pythonpath). 2. Try adding 'pysmbc' to the forced builtins: this will force pydev to analyze it dynamically (through a spawned python interpreter that'll import the library). See: http://pydev.org/manual_101_interpreter.html for details. Cheers, Fabio On Sun, Sep 18, 2011 at 10:36 AM, Moritz Schlarb <ma...@mo...> wrote: > Hi! > > I'm using PyDev 2.2.2.20 in Eclipse 3.7.0 and my code imports pysmbc > (libsmbclient bindings for python - http://pypi.python.org/pypi/pysmbc - > C module). Everything works finde, but PyDev marks the line > import smbc as Unresolved Import, although I've added ít to the > PYTHONPATH in project settings and in Interpreter settings (and the code > works fine, if I run it in Eclipse console). > > > Could this be because pysmbc is a C-module which is compiled natively? > > But the egg-zip-archive contains py-files, too! > > Archive: pysmbc-1.0.11.1-py2.7-linux-i686.egg > Length Date Time Name > --------- ---------- ----- ---- > 38498 08-26-2011 13:46 smbc.so > 514 08-26-2011 13:46 smbc.pyc > 274 08-26-2011 13:46 smbc.py > 1797 08-26-2011 13:46 EGG-INFO/PKG-INFO > 1 08-26-2011 13:46 EGG-INFO/zip-safe > 395 08-26-2011 13:46 EGG-INFO/SOURCES.txt > 8 08-26-2011 13:46 EGG-INFO/native_libs.txt > 5 08-26-2011 13:46 EGG-INFO/top_level.txt > 1 08-26-2011 13:46 EGG-INFO/dependency_links.txt > --------- ------- > 41493 9 files > > Could someone help me with this? > > Regards > > -- > Moritz Schlarb > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > http://p.sf.net/sfu/rim-devcon-copy2 > _______________________________________________ > Pydev-users mailing list > Pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-users > |
From: Moritz S. <ma...@mo...> - 2011-09-18 19:25:05
|
Thanks for your help, the second tip did do the trick! Cheers, Moritz Am 18.09.2011 20:12, schrieb Fabio Zadrozny: > 2 things: > > 1. The current pydev has a problem dealing with zipped files (updating > to the latest nightly should fix that -- you may need to reconfigure > your pythonpath). > > 2. Try adding 'pysmbc' to the forced builtins: this will force pydev > to analyze it dynamically (through a spawned python interpreter > that'll import the library). See: > http://pydev.org/manual_101_interpreter.html for details. > > Cheers, > > Fabio > > On Sun, Sep 18, 2011 at 10:36 AM, Moritz Schlarb <ma...@mo...> wrote: >> Hi! >> >> I'm using PyDev 2.2.2.20 in Eclipse 3.7.0 and my code imports pysmbc >> (libsmbclient bindings for python - http://pypi.python.org/pypi/pysmbc - >> C module). Everything works finde, but PyDev marks the line >> import smbc as Unresolved Import, although I've added ít to the >> PYTHONPATH in project settings and in Interpreter settings (and the code >> works fine, if I run it in Eclipse console). >> >> >> Could this be because pysmbc is a C-module which is compiled natively? >> >> But the egg-zip-archive contains py-files, too! >> >> Archive: pysmbc-1.0.11.1-py2.7-linux-i686.egg >> Length Date Time Name >> --------- ---------- ----- ---- >> 38498 08-26-2011 13:46 smbc.so >> 514 08-26-2011 13:46 smbc.pyc >> 274 08-26-2011 13:46 smbc.py >> 1797 08-26-2011 13:46 EGG-INFO/PKG-INFO >> 1 08-26-2011 13:46 EGG-INFO/zip-safe >> 395 08-26-2011 13:46 EGG-INFO/SOURCES.txt >> 8 08-26-2011 13:46 EGG-INFO/native_libs.txt >> 5 08-26-2011 13:46 EGG-INFO/top_level.txt >> 1 08-26-2011 13:46 EGG-INFO/dependency_links.txt >> --------- ------- >> 41493 9 files >> >> Could someone help me with this? >> >> Regards >> >> -- >> Moritz Schlarb >> >> >> ------------------------------------------------------------------------------ >> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA >> http://p.sf.net/sfu/rim-devcon-copy2 >> _______________________________________________ >> Pydev-users mailing list >> Pyd...@li... >> https://lists.sourceforge.net/lists/listinfo/pydev-users >> > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > http://p.sf.net/sfu/rim-devcon-copy2 -- Moritz Schlarb |