當前位置: 首頁>>代碼示例>>Python>>正文


Python StatsDateLib.getDayOfTheWeek方法代碼示例

本文整理匯總了Python中pxStats.lib.StatsDateLib.StatsDateLib.getDayOfTheWeek方法的典型用法代碼示例。如果您正苦於以下問題:Python StatsDateLib.getDayOfTheWeek方法的具體用法?Python StatsDateLib.getDayOfTheWeek怎麽用?Python StatsDateLib.getDayOfTheWeek使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pxStats.lib.StatsDateLib.StatsDateLib的用法示例。


在下文中一共展示了StatsDateLib.getDayOfTheWeek方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: printWebPage

# 需要導入模塊: from pxStats.lib.StatsDateLib import StatsDateLib [as 別名]
# 或者: from pxStats.lib.StatsDateLib.StatsDateLib import getDayOfTheWeek [as 別名]

#.........這裏部分代碼省略.........
                        </thead>
            
            
                        <tbody>
        
        """)
        
        
        
        
        for rxName in rxNamesArray :
            
            if rxNames[rxName] == "" :
                fileHandle.write( """<tr> <td bgcolor="#99FF99"> %s</td> """ %(rxName))
                fileHandle.write( """<td bgcolor="#66CCFF"> """ + _("Days") + """ :   """ )
            else:
                machineName = self.getMachineNameFromDescription( rxNames[rxName] ) 
                fileHandle.write( """<tr> <td bgcolor="#99FF99"><div class="left"> %s</div><div class="right"><a href="#" onClick="descriptionWindow.load('inline', '%s', 'Description');descriptionWindow.show(); return false"><font color="black">?</font></a></div><br>(%s)</td> """ %(rxName, rxNames[rxName].replace("'","").replace('"','').replace( ",", ", "), machineName ) )
                fileHandle.write( """<td bgcolor="#66CCFF"> """ + _("Days") + """ :   """ )
                
                    
            for day in self.days:
                
                currentYear, currentMonth, currentDay = StatsDateLib.getYearMonthDayInStrfTime( day )
                
                _ = self.getTranslatorForModule( CURRENT_MODULE_ABS_PATH, self.filesLanguage)
                
                file = file = self.pathsTowardsGraphics.STATSGRAPHSARCHIVES + _("daily/rx/%s/")%( rxName ) + str(currentYear) + "/" + str(currentMonth) + "/" + str(currentDay) + ".png"
                webLink = _("archives/daily/rx/%s/")%( rxName ) + str(currentYear) + "/" + str(currentMonth) + "/" + str(currentDay) + ".png"
                
                _ = self.getTranslatorForModule( CURRENT_MODULE_ABS_PATH, self.displayedLanguage )
                
                if os.path.isfile( file ):
                    fileHandle.write(  """<a target ="%s" href="%s">"""%( rxName, webLink) + "%s" %StatsDateLib.getDayOfTheWeek(day)  + """   </a>""" )
                else :
                    pass 
                     
            fileHandle.write( """</td></tr>""" )
        
        fileHandle.write( """
        
                </tbody>
            </table>
        </div>
           
        <h2>""" + _("Daily graphics for TX clients from MetPx.") + """ <font size = "2">""" +_("*updated hourly") + """</font></h2>
        
        <div class="tableContainer">         
            <table> 
                <thead>
                    <tr>
    
                         <td bgcolor="#006699">
                            <div class = "txTableEntry">
                                <font color = "white">
                                    <center>
                                        Clients
                                        <br>
                                        <a target ="popup" href="#" onClick="showClientHelpPage(); return false;">                                        
                                          ?
                                        </a>
                                    <center>
                                </font>
                            </div>
                        </td>
                        
開發者ID:hawkeye438,項目名稱:metpx,代碼行數:69,代碼來源:DailyGraphicsWebPageGenerator.py


注:本文中的pxStats.lib.StatsDateLib.StatsDateLib.getDayOfTheWeek方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。