Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/d/o/douban-quixote-HEAD/quixote/ptl_import.py   douban-quixote(Download)
import __builtin__
 
from ptl_compile import compile_template, PTL_EXT, PTLC_EXT, PTLC_MAGIC
 
assert sys.hexversion >= 0x20000b1, "need Python 2.0b1 or later"
    path, ext = os.path.splitext(filename)
    ptl_filename = path + PTL_EXT
    magic = file.read(len(PTLC_MAGIC))
    if magic != PTLC_MAGIC:
        return _load_ptl(name, ptl_filename)

src/d/o/douban-quixote-HEAD/quixote/ptlc_dump.py   douban-quixote(Download)
import types
 
from ptl_compile import PTLC_MAGIC
 
def dump(obj):
def loadCode(path):
    f = open(path)
    magic = f.read(len(PTLC_MAGIC))
    if magic != PTLC_MAGIC:
        raise ValueError, 'bad .ptlc magic for file "%s"' % path