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


Python macostools.touched方法代碼示例

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


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

示例1: test_touched

# 需要導入模塊: import macostools [as 別名]
# 或者: from macostools import touched [as 別名]
def test_touched(self):
        # This really only tests that nothing unforeseen happens.
        with test_support.check_warnings(('macostools.touched*',
                                          DeprecationWarning), quiet=True):
            macostools.touched(test_support.TESTFN) 
開發者ID:IronLanguages,項目名稱:ironpython2,代碼行數:7,代碼來源:test_macostools.py

示例2: settypecreator

# 需要導入模塊: import macostools [as 別名]
# 或者: from macostools import touched [as 別名]
def settypecreator(self, file):
        file = Carbon.File.pathname(file)
        record = self.mapfile(os.path.split(file)[1])
        MacOS.SetCreatorAndType(file, record[2], record[1])
        macostools.touched(fss)

# Convenience routines 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:9,代碼來源:ic.py

示例3: drawToFile

# 需要導入模塊: import macostools [as 別名]
# 或者: from macostools import touched [as 別名]
def drawToFile(d, fn, msg="", showBoundary=rl_config._unset_, autoSize=1):
    """Makes a one-page PDF with just the drawing.

    If autoSize=1, the PDF will be the same size as
    the drawing; if 0, it will place the drawing on
    an A4 page with a title above it - possibly overflowing
    if too big."""
    d = renderScaledDrawing(d)
    c = Canvas(fn)
    if msg:
        c.setFont(rl_config.defaultGraphicsFontName, 36)
        c.drawString(80, 750, msg)
    c.setTitle(msg)

    if autoSize:
        c.setPageSize((d.width, d.height))
        draw(d, c, 0, 0, showBoundary=showBoundary)
    else:
        #show with a title
        c.setFont(rl_config.defaultGraphicsFontName, 12)
        y = 740
        i = 1
        y = y - d.height
        draw(d, c, 80, y, showBoundary=showBoundary)

    c.showPage()
    c.save()
    if sys.platform=='mac' and not hasattr(fn, "write"):
        try:
            import macfs, macostools
            macfs.FSSpec(fn).SetCreatorType("CARO", "PDF ")
            macostools.touched(fn)
        except:
            pass 
開發者ID:Microvellum,項目名稱:Fluid-Designer,代碼行數:36,代碼來源:renderPDF.py

示例4: markfilename

# 需要導入模塊: import macostools [as 別名]
# 或者: from macostools import touched [as 別名]
def markfilename(filename,creatorcode=None,filetype=None,ext='PDF'):
        try:
            if creatorcode is None or filetype is None and ext is not None:
                try:
                    creatorcode, filetype = _KNOWN_MAC_EXT[ext.upper()]
                except:
                    return
            macfs.FSSpec(filename).SetCreatorType(creatorcode,filetype)
            macostools.touched(filename)
        except:
            pass 
開發者ID:Microvellum,項目名稱:Fluid-Designer,代碼行數:13,代碼來源:utils.py

示例5: test_touched

# 需要導入模塊: import macostools [as 別名]
# 或者: from macostools import touched [as 別名]
def test_touched(self):
        # This really only tests that nothing unforeseen happens.
        macostools.touched(test_support.TESTFN) 
開發者ID:ofermend,項目名稱:medicare-demo,代碼行數:5,代碼來源:test_macostools.py


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