Created
December 18, 2010 17:25
-
-
Save dtinth/746676 to your computer and use it in GitHub Desktop.
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
>>> from pizza import pizza | |
>>> print ''.join([ '- ' + crust['name'] + '\n' for crust in pizza.pizza.getAllCrustType('EN') ]) | |
- Thirty Bites Pizza(Promotion) | |
- Thirty Bites Pizza | |
- Pan Pizza | |
- Thin Crispy | |
- Cheesy Max | |
- Extreme Pizza | |
- Extra Cheesy Sausage Bites | |
- X-Pan | |
- Pizza Puff |
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
#!/usr/bin/python2.6 | |
from pyamf.remoting.client import RemotingService | |
class Pizza: | |
def __init__(self): | |
self.gateway = RemotingService('http://www.pizza.co.th/amfphp/gateway.php') | |
self.gateway.addHTTPHeader ('Referer', 'http://www.pizza.co.th/site.swf'); | |
self.services = {} | |
def __getattr__(self, name): | |
if not name in self.services: | |
self.services[name] = self.gateway.getService(name + 'Service') | |
return self.services[name] | |
pizza = Pizza() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment