Am 25.01.2011 14:17, schrieb Laurent Guyon: > > One very important thing for this should be a way to call theses > "modules" > > from the shell (like a dummy command that load the module and "run" > it with > > parameters). > > > > This can be done using a decorator perhaps, each "module" beeing a class. > There is no need for a class (wherever it may ease implementation of the "checker" interface). One can easily implement something like this:
def check(..): # .... implementation def testrun(...): #... parse args #... put a lot of magic here #... and run check if __name__ == '__main__': testrun() You may want to have a look at <http://svn.origo.ethz.ch/wsvn/pdfposter/trunk/pdftools/pdfposter/cmd.py> and <http://svn.origo.ethz.ch/wsvn/pdfposter/trunk/pdftools/pdfposter/__init__.py>. Just think of both modules concatenated. -- Schönen Gruß - Regards Hartmut Goebel Dipl.-Informatiker (univ.), CISSP, CSSLP Goebel Consult Spezialist für IT-Sicherheit in komplexen Umgebungen http://www.goebel-consult.de/blog Monatliche Kolumne: http://www.cissp-gefluester.de/ Goebel Consult mit Mitglied bei http://www.7-it.de
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________ Shinken-devel mailing list Shinken-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/shinken-devel