How to start developing Plone - from the scratch approach.
Use man pages, info pages and commandline help before asking others, please.
| Zope start process | |
| Zope2.__init__ contains ZopeStarter | |
| def prepare(self): | |
| self.setupInitialLogging() | |
| self.setupLocale() | |
| self.setupSecurityOptions() | |
| self.setupPublisher() | |
| # Start ZServer servers before we drop privileges so we can bind to |
| /** | |
| * Parse hash bang parameters from a URL as key value object. | |
| * | |
| * For repeated parameters the last parameter is effective. | |
| * | |
| * If = syntax is not used the value is set to null. | |
| * | |
| * #x&y=3 -> { x:null, y:3 } | |
| * | |
| * @param aURL URL to parse or null if window.location is used |
| """ | |
| See that rendering Javascript loads jobs properly. | |
| Skeleton based on https://github.com/Pylons/deformdemo/blob/master/deformdemo/test.py | |
| Running:: | |
| ./run-selenium.sh |
| import sys | |
| old_f = sys.stdout | |
| BAD_OUTPUT = "hospitalArrival_dateTimeStrokeOnSet" | |
| class F: | |
| def write(self, x): | |
| if x == BAD_OUTPUT: | |
| import pdb ; pdb.set_trace() |
| # -*- coding: utf8 -*- | |
| import os | |
| import subprocess | |
| def create_prelisten_ogg(mp3, ogg): | |
| """ | |
| Run en-code for a single file | |
| Do 48 kbit files for prelisten. | |
| """ |
| # Python 2.6 compatible ordered dict | |
| # NOTE: API is not 1:1, but for normal dict access of | |
| # set member, iterate keys and values this is enough | |
| # Add odict egg to your project http://pypi.python.org/pypi/odict/ | |
| try: | |
| from collections import OrderedDict | |
| except ImportError: | |
| from odict import odict as OrderedDict |
| /** | |
| * Kindly ask to redraw the one frame preview. | |
| * | |
| * This function has throttling support so you can | |
| * fire this from mouse move events (color picking) safely. | |
| * | |
| * XXX: Make sure all the fonts are loaded in this point or the | |
| * first round of text rendering fails. See hidden font preloader in creator.pt. | |
| * |
| import datetime | |
| string = "1.1.2012" | |
| date = datetime.datetime.strptime(string, '%d.%m.%Y').date() |
| # The trick is to pass timedelta object as a sort key and not to use cmp() function | |
| import datetime | |
| def date_key(a): | |
| """ | |
| a: date as string | |
| """ | |
| a = datetime.datetime.strptime(a, '%d.%m.%Y').date() | |
| return a |