http://www.jansipke.nl/python-soap-client-with-suds/
That article was very helpful for learning to use Python's SUDS library for consuming soap web services.
Here's an example of my simple client:
from suds.client import Client
client = Client("http://xxx.xxx.xxx.xxx/API/Info.asmx?WSDL")
client.service.getInfo("05/12/2013","05/12/2013")
"05/12/2013" and "05/12/2013" are both parameters
Paul's Programming Notes
Sunday, May 19, 2013
Saturday, May 11, 2013
New Vocabulary Word
CRUD
-Create
-Read
-Update
-Delete
An example of a CRUD application would be something that tracks orders in a database. All 4 actions are going to be necessary to track those orders. CRUD: The basic database operations.
-Create
-Read
-Update
-Delete
An example of a CRUD application would be something that tracks orders in a database. All 4 actions are going to be necessary to track those orders. CRUD: The basic database operations.
Tuesday, May 7, 2013
Dynamically Import Data From Other Workbooks - Google Spreadsheet
I made a google spreadsheet which pulls data from two other workbooks using "importRange" and QUERY function. You can use either one if you just want to pull a few columns from another spreadsheet. QUERY provides more flexibility by allowing you to use a SQL statement. Here is an example of a query which pulls 2 columns from another workbook and filters out the blank rows in column 41:
=QUERY(importRange("yourSpreadsheetKeyHere", "Donations!A3:BB200000"), "select Col41, Col2 WHERE Col41!='' ", 1)
One of the biggest pains during the entire process was google spreadsheet's vlookup. I learned the vlookup function only searches for a value in the first column in the Array. It's also helpful if you format the results of your vlookup as "Plain Text" under the numbers format drop-down. Of course, something formatted as a number won't match something formatted as plain text.
=QUERY(importRange("yourSpreadsheetKeyHere", "Donations!A3:BB200000"), "select Col41, Col2 WHERE Col41!='' ", 1)
One of the biggest pains during the entire process was google spreadsheet's vlookup. I learned the vlookup function only searches for a value in the first column in the Array. It's also helpful if you format the results of your vlookup as "Plain Text" under the numbers format drop-down. Of course, something formatted as a number won't match something formatted as plain text.
You could use this technique if you have a list of customer id's with names, and a separate spreadsheet with more customer information. With this, you could combine that information.
Javascript Excel Parser
http://niggler.github.io/js-xlsx/
That's an impressive project that allows parsing excel files in the browser.
Saturday, April 27, 2013
Green Mountain Energy's B2B Site
Green Mountain Energy has the worst B2B portal I've seen in my life. The worst parts:
Update: They sent a letter saying they made a new business portal site. www.businessportal.greenmountain.com My first visit gives me an "Our site is currently down as we upgrade our systems." error message.
- It only works in IE (barely, and switching between browser versions in the F12 menu doesn't help)
- The page only takes up ~30% of the browser window (see the picture)
- Nothing is functional, I can't change my automated billing agreement because there's no submit button.
- If you have more than one address on your account, just give up.
Picture: http://i.imgur.com/cP4CLTl.png
Update: They sent a letter saying they made a new business portal site. www.businessportal.greenmountain.com My first visit gives me an "Our site is currently down as we upgrade our systems." error message.
Friday, April 26, 2013
Don't Use == null - Python
http://stackoverflow.com/questions/3289601/null-object-in-python
It says not to use == to check for "none-ness". It's better to use:
if variable is none:
<your code>
Why? "And the reason for choosing
It says not to use == to check for "none-ness". It's better to use:
if variable is none:
<your code>
Why? "And the reason for choosing
egg is None over egg == None: The latter can be overloaded, and is likely to break when comparing valid object with None (depends on how it's implemented, but you don't expect everyone to take comparisions with None into account, do you?), while is always works the same."
Thursday, April 25, 2013
Subscribe to:
Posts (Atom)
