Move main entry point in jcl.runner

darcs-hash:20071112171733-86b55-017d1391c88e8ed7e097c2696d2b8beafef79436.gz
This commit is contained in:
David Rousselie
2007-11-12 18:17:33 +01:00
parent a1f715115b
commit 882f61d812
3 changed files with 25 additions and 52 deletions

7
README
View File

@@ -4,10 +4,3 @@ Jabber Component Library
Present a higher level component framework for developing Jabber
component.
Here is the class the implement to create a new Jabber component (be
sure to override every methods) :
- a class inheriting from JabberComponent
- a Feeder (inheriting from Feeder)
- a Sender (inheriting from Sender)

View File

@@ -1,34 +0,0 @@
##
## jcl.py
## Login : David Rousselie <dax@happycoders.org>
## Started on Fri May 18 15:19:20 2007 David Rousselie
## $Id$
##
## Copyright (C) 2007 David Rousselie
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
del sys.setdefaultencoding
import jcl
from jcl.runner import JCLRunner
if __name__ == '__main__':
runner = JCLRunner("JCL", jcl.version)
runner.configure()
runner.run()

View File

@@ -214,3 +214,17 @@ class JCLRunner(object):
return component.run()
self._run(run_func)
def main():
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
del sys.setdefaultencoding
import jcl
from jcl.runner import JCLRunner
runner = JCLRunner("JCL", jcl.version)
runner.configure()
runner.run()
if __name__ == '__main__':
main()