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

All Samples(3)  |  Call(0)  |  Derive(0)  |  Import(3)
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/f/t/ftw.pdfgenerator-1.3.0/ftw/pdfgenerator/browser/views.py   ftw.pdfgenerator(Download)
from Products.Five import BrowserView
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from ftw.pdfgenerator.interfaces import DEBUG_MODE_SESSION_KEY
from ftw.pdfgenerator.interfaces import IPDFAssembler
from zope.component import getMultiAdapter
            return True
 
        elif self.request.SESSION.get(DEBUG_MODE_SESSION_KEY, False):
            return True
 
    def __call__(self):
        session = self.request.SESSION
 
        session[DEBUG_MODE_SESSION_KEY] = not session.get(
            DEBUG_MODE_SESSION_KEY, False)
 
        return 'PDFGenerator debug mode is now %s' % (
            session.get(DEBUG_MODE_SESSION_KEY) and 'enabled' or 'disabled')

src/f/t/ftw.pdfgenerator-1.3.0/ftw/pdfgenerator/tests/test_export.py   ftw.pdfgenerator(Download)
from ftw.pdfgenerator import interfaces
from ftw.pdfgenerator.browser.views import ExportPDFView
from ftw.pdfgenerator.interfaces import DEBUG_MODE_SESSION_KEY
from ftw.pdfgenerator.testing import PDFGENERATOR_ZCML_LAYER
from ftw.testing import MockTestCase

src/f/t/ftw.pdfgenerator-1.3.0/ftw/pdfgenerator/tests/test_debugview.py   ftw.pdfgenerator(Download)
from ftw.pdfgenerator.browser.views import DebugPDFGeneratorView
from ftw.pdfgenerator.interfaces import DEBUG_MODE_SESSION_KEY
from ftw.pdfgenerator.testing import PDFGENERATOR_ZCML_LAYER
from plone.mocktestcase.dummy import Dummy
from unittest2 import TestCase