- LastChangedDate
$LastChangedDate$ - LastChangedRevision
$LastChangedRevision$ - LastChangedBy
$LastChangedBy$
This is the eleventh part of the Twisted tutorial Twisted from Scratch, or The Evolution of Finger <index>
.
In this part, we make it easier for non-programmers to configure a finger server. Plugins are discussed further in the Twisted Plugin System <../plugin>
howto. Writing twistd plugins is covered in Writing a twistd Plugin <../tap>
, and .tac applications are covered in Using the Twisted Application Framework <../application>
.
So far, the user had to be somewhat of a programmer to be able to configure stuff. Maybe we can eliminate even that? Move old code to finger/__init__.py
and...
Full source code for finger module here:
finger.py <listings/finger/finger/finger.py>
listings/finger/finger/finger.py
tap.py <listings/finger/finger/tap.py>
listings/finger/finger/tap.py
And register it all:
finger_tutorial.py <listings/finger/twisted/plugins/finger_tutorial.py>
listings/finger/twisted/plugins/finger_tutorial.py
Note that the second argument to twisted.application.service.ServiceMaker <ServiceMaker>
,finger.tap
, is a reference to a module (finger/tap.py
), not to a filename.
And now, the following works
% sudo twistd -n finger --file=/etc/users --ircnick=fingerbot
For more details about this, see the twistd plugin documentation <../tap>
.