Gmail/Google Apps:
Host: imap.gmail.com
Port: 993
Username: [email protected] or [email protected] (Google Apps)
Password: Your email password
SSL: Yes
| ~/tmp $ go build -gcflags=-S test-1.go | more | |
| # command-line-arguments | |
| "".main t=1 size=256 value=0 args=0x0 locals=0x70 | |
| 0x0000 00000 (/Users/patrick/tmp/test-1.go:7) TEXT "".main(SB), $112-0 | |
| 0x0000 00000 (/Users/patrick/tmp/test-1.go:7) MOVQ (TLS), CX | |
| 0x0009 00009 (/Users/patrick/tmp/test-1.go:7) CMPQ SP, 16(CX) | |
| 0x000d 00013 (/Users/patrick/tmp/test-1.go:7) JLS 231 | |
| 0x0013 00019 (/Users/patrick/tmp/test-1.go:7) SUBQ $112, SP | |
| 0x0017 00023 (/Users/patrick/tmp/test-1.go:7) FUNCDATA $0, gclocals·7d2d5fca80364273fb07d5820a76fef4(SB) | |
| 0x0017 00023 (/Users/patrick/tmp/test-1.go:7) FUNCDATA $1, gclocals·5ef976c2593056b9243adf402ae9d952(SB) |
| # Makefile for a go project | |
| # | |
| # Author: Jon Eisen | |
| # site: joneisen.me | |
| # | |
| # Targets: | |
| # all: Builds the code | |
| # build: Builds the code | |
| # fmt: Formats the source files | |
| # clean: cleans the code |
Gmail/Google Apps:
Host: imap.gmail.com
Port: 993
Username: [email protected] or [email protected] (Google Apps)
Password: Your email password
SSL: Yes
| import simplejson as json | |
| import lxml | |
| class objectJSONEncoder(json.JSONEncoder): | |
| """A specialized JSON encoder that can handle simple lxml objectify types | |
| >>> from lxml import objectify | |
| >>> obj = objectify.fromstring("<Book><price>1.50</price><author>W. Shakespeare</author></Book>") | |
| >>> objectJSONEncoder().encode(obj) | |
| '{"price": 1.5, "author": "W. Shakespeare"}' | |
| """ |
| #!/usr/bin/env python | |
| # -*- encoding: utf-8 -*- | |
| """xml2json.py Convert XML to JSON | |
| Relies on ElementTree for the XML parsing. This is based on | |
| pesterfish.py but uses a different XML->JSON mapping. | |
| The XML->JSON mapping is described at | |
| http://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html |
| """ | |
| Convert an XML list of Tim Hortons restaurant locations to JSON | |
| Usage: python parse.py sourcefile destfile | |
| E.g.: python parse.py locations.xml locations.json | |
| """ | |
| import json | |
| import sys | |
| try: |