1

My project structure is as below. I couldn't find enough data from the twisted documentation

-rolling
       ->roll
            ->__init__.py
            ->rollserver.py
       ->twisted
             ->plugins
                     ->roll_plugin.py

My roll_plugin.py looks like this-

from zope.interface import implementer
from twisted.plugin import IPlugin
from twisted.application.service import IServiceMaker
from utils.annon_edro import Options, GPMSBridgeService
from roll..rollserver import RollFactory


@implementer(IServiceMaker, IPlugin)
class MyServiceMaker(object):
    tapname = "roll"
    description = 'Open the great door of roll for default'
    options = Options

    def makeService(self, options):
        return internet.TCPServer(8999, RollFactory())

serviceMaker = MyServiceMaker()

I ran twistd --help I do not see the sub command there. Whilst this code runs fine with Python2 but not with Python3.10.

  1. What am I doing wrong here?
  2. Is there any way we debug twistd code?
Jolly
  • 126
  • 6
  • This probably depends on how your environment is set up - so adding some details about that may make it easier for someone to answer. – Jean-Paul Calderone May 16 '22 at 23:28
  • I had created virtual environement with twisted packages 20.3.0 and 22.4.0 for python2 and python3 respectively. – Jolly May 17 '22 at 11:55

1 Answers1

1

The directory path was missing in sys.path, adding it worked for me.

Jolly
  • 126
  • 6