This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while [x for x in range(100) if x%2 == 0]: | |
print x | |
for x in range(100): | |
if x%2 == 0: | |
print x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/couchdb_python_26_svn/couchdb director$ nosetests -v --with-doctest client.py | |
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ToscaWidgets-0.9.5dev_20081026-py2.6.egg/tw/core/view.py:202: DeprecationWarning: object.__new__() takes no parameters | |
obj = object.__new__(cls, *args, **kw) | |
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PEAK_Rules-0.5a1.dev_r2582-py2.6.egg/peak/rules/indexing.py:220: DeprecationWarning: object.__new__() takes no parameters | |
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/httplib2-0.4.0-py2.6.egg/httplib2/__init__.py:29: DeprecationWarning: the md5 module is deprecated; use hashlib instead | |
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/httplib2-0.4.0-py2.6.egg/httplib2/__init__.py:44: DeprecationWarning: the sha module is deprecated; use the hashlib module instead | |
Doctest: couchdb.client ... ok | |
Doctest: couchdb.client.Database ... ok | |
Doctest: couchdb.cli |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python client.py | |
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/httplib2-0.4.0-py2.6.egg/httplib2/__init__.py:29: DeprecationWarning: the md5 module is deprecated; use hashlib instead | |
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/httplib2-0.4.0-py2.6.egg/httplib2/__init__.py:44: DeprecationWarning: the sha module is deprecated; use the hashlib module instead | |
......EE.E...F...F. | |
====================================================================== | |
ERROR: test_include_docs (__main__.DatabaseTestCase) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "client.py", line 124, in test_include_docs | |
include_docs=True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
help = wx.Menu() | |
self.help = help | |
ID_MENU_HELP_ABOUT = wx.NewId() | |
self.ID_MENU_HELP_ABOUT = ID_MENU_HELP_ABOUT | |
about = help.Append(ID_MENU_HELP_ABOUT,"About") | |
idle = help.Append(-1,"Date will be here") | |
mb.Append( engine, "Engine") | |
mb.Append( blog , "Blog") | |
mb.Append( help, "Help") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smtplib | |
def mail(): | |
fromAddr = "user@yourgoogleappsdomain" #if your account is from gmail don't use @yourgoogleappsdomain | |
password = "your google apps account password" | |
toAddrs = ["user@domain", "anotheruser@anotherdomainmaybe"] | |
subject = "testing" | |
body = "dont answer it is just a test" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wx | |
from breve.tags.html import tags as T | |
from breve.flatten import flatten | |
import os | |
from stat import * | |
""" | |
This is now a wxpython version. | |
Builds an show in browser and html file showing directories and files in selected PATH | |
""" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def OnKeyDown(self, evt): | |
try: | |
mykey = evt.KeyCode() | |
except: | |
mykey = evt.GetKeyCode() | |
if mykey == wx.WXK_F6: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[error] [<0.64.0>] {error_report,<0.22.0>, | |
{<0.64.0>,crash_report, | |
[[{pid,<0.64.0>}, | |
{registered_name,[]}, | |
{error_info, | |
{error, | |
{badmatch,{error,nxdomain}}, | |
[{couch_rep,do_http_request,4}, | |
{couch_rep,open_doc,3}, | |
{couch_rep,replicate2,5}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Main Controller""" | |
from dic23.lib.base import BaseController | |
from tg import expose, flash, require | |
from pylons.i18n import ugettext as _ | |
#from tg import redirect, validate | |
from dic23.model import DBSession, metadata | |
from catwalk.tg2 import Catwalk | |
from repoze.what import predicates | |
from dic23.controllers.secc import Secc | |
from sprox.formbase import AddRecordForm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys; sys.__plen = len(sys.path) | |
./mercurial-1.0.2-py2.6-macosx-10.3-ppc.egg | |
./Tempita-0.2-py2.6.egg | |
./Routes-1.10.1-py2.6.egg | |
./Pygments-0.11.1-py2.6.egg | |
./PasteDeploy-1.3.3dev_r7463-py2.6.egg | |
./paramiko-1.7.4-py2.6.egg | |
./pycrypto-2.0.1-py2.6-macosx-10.3-ppc.egg | |
/Users/director/couchdb_python_26_svn | |
./httplib2-0.4.0-py2.6.egg |