Questions tagged [zope.interface]

The zope.interface module provides an implementation of "object interfaces" for Python.

Interfaces are a mechanism for labeling objects as conforming to a given API or contract. The zope.interface package can be considered as an implementation of the Design By Contract methodology in Python.

zope.interface does not depend on the Zope server framework and does not imply using any other part of Zope.

53 questions
2
votes
2 answers

Interface Inherited declaration

I'm trying to use an old code which has been developed by a Github developer. The code uses implements in zope.interface library to declare interfaces on a class's elements. Since implements in the library doesn't work anymore at Python 3.6, I…
Sad Vaseb
  • 299
  • 3
  • 10
2
votes
1 answer

"Importerror: no module named zope.interface", but I already installed on my Centos 7

Why I cant run this code? I already have zope.interface I have try update the path but still doesn't work, I don't know why. See the image above: import paho.mqtt.client as mqtt from twisted.internet import reactor, protocol from txws import…
Akbar Pandu
  • 51
  • 1
  • 3
2
votes
1 answer

Plone - How can I make a validator validate a field from a behavior for a specific content type?

I am using Plone 4.3 and I have a form.SchemaForm plone.directives have an interface that has a start field from IEventBasic and a validator: from datetime import timedelta from plone.directives import form from plone.app.contenttypes.interfaces…
Patrick Downey
  • 965
  • 8
  • 13
2
votes
2 answers

how do i install zope interface with python 2.6?

During setup, I'm like missing vcvarsall.bat running build running build_py running build_ext building '_zope_interface_coptimizations' extension error: Unable to find vcvarsall.bat
goh
  • 27,631
  • 28
  • 89
  • 151
2
votes
2 answers

Issue on running Twisted on AWS

First of all, I need to run twisted application on my server but what I get is this error File "server2.py", line 1, in from twisted.internet.protocol import Factory, Protocol File…
maou
  • 23
  • 5
2
votes
0 answers

ImportError: Twisted requires zope.interface 3.6.0 or later: no module named zope.interface

I am trying to build a web scraper (http://doc.scrapy.org/en/0.24/intro/tutorial.html#intro-tutorial), but when I am trying to launch the crawler, I am getting this error: Traceback (most recent call last): File…
Feyzi Bagirov
  • 1,292
  • 4
  • 28
  • 46
2
votes
1 answer

How to get "cast like" adaption to work with pure zope.interface?

I would like to get the "C++ cast like" adaption to work with the code from zope.interface. In my real use case, I'm using a registry from Pyramid but it derives from zope.interface.registry.Components, which according to the changes.txt was…
Achim
  • 15,415
  • 15
  • 80
  • 144
2
votes
1 answer

Tests for pyramid app fail if reexecuted using sniffer

I just started to get my testing environment for a pyramid web app up and running. I have just a few basic tests, including some examples created by the pyramid paster template. If I run them via nosetest everything works fine. If I run them via…
Achim
  • 15,415
  • 15
  • 80
  • 144
1
vote
2 answers

Plone - cannot copy and paste view in Zope Management Interface's plone_skins' plone_content

We are using Plone 4.1.2, and are having problem doing a copy and paste of a view in Zope Management Interface's plone_skins' plone_content. We get this error message: Thank you very much in anticipation. You are here: Home › portal_skins ›…
user1017702
  • 295
  • 3
  • 11
1
vote
1 answer

zope.annotation example in documentation fails. Help needed to correct it

I am trying to understand Annotations from this document: http://docs.zope.org/zope.annotation/index.html However the example fails when run. I get: Traceback (most recent call last): File "./zopepy", line 366, in
sureshvv
  • 4,234
  • 1
  • 26
  • 32
1
vote
1 answer

How to declare @staticmethod in zope.interface

I try to create interface with @staticmethod and @classmethod. Declaring class method is simple. But I can't find the correct way to declare static method. Consider class interface and its implementation: #!/usr/bin/python3 from zope.interface…
seninds
  • 13
  • 2
1
vote
1 answer

Having trouble installing buildslave on Windows 7

I finally got pip install buildbot-slave to work on Win7 (thanks to another answer on this site), and now when I attempt to create a build slave via: buildslave create-slave slavefolder blah.blah.com:9989 buildslave password It kicks back the…
Nathan Black
  • 181
  • 6
1
vote
1 answer

python install zope.interface module, show : AssertionError: Tried to end_progress without start_progress

I use python ,and want to install module zope.interface in window 7, I used the cmd : pip install zope.interface but the console show : Removing temporary dir c:\users\000790\appdata\local\temp\pip_build_000790... Exception: Traceback (most recent…
user3326374
  • 11
  • 1
  • 3
1
vote
2 answers

Plone translation issues

I am a plone Newbie and I needed to change a translated word in the .po file, the translation is in Arabic. When I changes the word to the right word and restarted the zope. My plone site is no more reading the Arabic translations from this file and…
Sarah
  • 1,361
  • 2
  • 14
  • 20
1
vote
0 answers

Python source analyzer that works with zope components

There's a code base (Py 2.6 stuff) that extensively uses zope components and there's a need for tool that can analyze the sources. The tool is supposed to analyze the source; like look for usage of some restricted classes/objects/interfaces, etc.…
megazoe
  • 545
  • 1
  • 4
  • 17