[PyQt] ANN: dip v0.1 Released - An Application Development Framework for PyQt and Python v3

Phil Thompson phil at riverbankcomputing.com
Thu Jul 22 15:02:12 BST 2010


On Tue, 20 Jul 2010 09:25:58 -0400, Darren Dale <dsdale24 at gmail.com>
wrote:
> Are there some files missing from the plugins example? When I run
> main.py from the plugins example, I get:
> 
> Traceback (most recent call last):
>   File "main.py", line 3, in <module>
>     from recipes.plugins import RecipeChooserPlugin
>   File
>   "/home/darren/Projects/dip/doc/examples/plugins/recipes/__init__.py",
> line 4, in <module>
>     from .i_recipe_chooser import IRecipeChooser
>   File
>  
"/home/darren/Projects/dip/doc/examples/plugins/recipes/i_recipe_chooser.py",
> line 3, in <module>
>     from stock import IStockLevels
> ImportError: No module named stock
> 
> I think there may be two issues: the stock module/package is not
> included in the sources/hg repo, and an absolute import is being used
> rather than a relative import:
> 
> $ grep -r StockLevels .
> ./recipes/plugins/recipe_chooser_plugin.py:from stock import
IStockLevels
> ./recipes/plugins/recipe_chooser_plugin.py:        stock_levels =
> self.service(IStockLevels)
> ./recipes/i_recipe_chooser.py:from stock import IStockLevels
> ./recipes/i_recipe_chooser.py:    stock_levels = Instance(IStockLevels)

No, it's not supposed to be a complete example. The plugin should be
complete but (as it says in the docs) other plugins are assumed to provide
additional functionality (including stock levels).

Phil


More information about the PyQt mailing list