Differences

This shows you the differences between two versions of the page.

Link to this comparison view

arnaud [2012/06/05 11:15]
sadmin [Hide CONTENT]
arnaud [2018/02/01 18:15]
Line 1: Line 1:
-====== - Titre ====== 
-===== - Sous Titre ===== 
-<sxh python; collapse;​nocontrols;​title:​ Example of python code> 
-if __name__ == '​__main__':​ 
-  logging.basicConfig(level=logging.INFO) 
-  _LOG = logging.getLogger('​manual_zone_extraction'​) 
-  ​ 
-  lsUsage = "​Usage:​ %prog -p <​port>"​ 
-  ​ 
-  loArgumentParser = OptionParser(usage=lsUsage) 
-  loArgumentParser.add_option("​-p",​ "​--port",​ dest="​port",​ help="​Http listening port", default='​8080'​) 
-  loArgumentParser.add_option("​-a",​ "​--admins",​ dest="​admins",​ help="​List of administrators",​ default='​admin'​) 
-  loArgumentParser.add_option("​-u",​ "​--users",​ dest="​users",​ help="​List of users with their passwords",​ default='​admin:​admin_ltutechnologies,​ltutech:​ltutechnologies'​) 
-  (loOptions, args) = loArgumentParser.parse_args() 
-      
-  try: 
-    #Handling port option 
-    if loOptions.port:​ 
-      cherrypy.config.update({'​server.socket_port':​ int(loOptions.port)}) 
-        ​ 
-    #Building admin list 
-    if loOptions.admins:​ 
-      ldAdmins = buildAdminsList(loOptions.admins) 
-    ​ 
-    #Building list of users 
-    if loOptions.users:​ 
-      ldUsers = buildUsersList(loOptions.users) 
-      ​ 
-    loManualZoneExtractor = ManualZoneExtractor(ldAdmins,​ ldUsers) 
-    _LOG.warning("​Server launched. Please visit %s to start annotation",​ cherrypy.url()) 
-    ​ 
-    lsConfiguration=os.path.join('​..',​ '​conf','​extractzone_cherrypy.conf'​) 
-    cherrypy.quickstart(loManualZoneExtractor,​ "/",​ lsConfiguration) 
-    ​ 
-  #​Interruption by keyboard (ctrl-C) 
-  except (KeyboardInterrupt) : 
-    _LOG.debug("​KeyboardInterrupt caught. Stopping."​) 
-    cherrypy.server.stop() 
-</​sxh>​ 
-==== - Sous sous titre ==== 
- 
-===== - Sous Titre===== 
-^ Titre     ^ Titre 2   ^ 
-| Comment 1 | Comment 2 | 
- 
-====== Hide CONTENT ====== 
- 
-<hidden What's new> 
-The latest version of Firefox has the following changes: 
- 
-Please see the complete list of changes in this version. Web and extension developers should also view the curated list of platform changes. You may also be interested in the list of changes in the previous version. 
- 
-Note: External parties tracking Firefox release uptake should be aware that we manage and monitor the rate of automatic updates to ensure a smooth release. Users can always manually check for updates from the About Firefox window to see whether they are up to date.  
-</​hidden>​ 
- 
-{{page>​index}} 
-